알러트 동작 문제
본문
<form name="wp" id="wp" method="post" action="./pointupdate.php" autocomplete="off">
<ul class="point_all">
<li class="full_li">
보유포인트
<span><?php echo number_format($member['mb_point']); ?></span>
</li>
<li class="full_li">
<div>
<label for="w_point">신청 포인트</label>
<div style="float:right;">
<input type="text" name="w_point" id="w_point" size="15" placeholder="0"> 점
</div>
</div>
</li>
</ul>
<input type="submit" name="act_button" value="신청" onclick="forderform_check(this.form);" class="btn_close" style="background:#ebebeb;">
</form>
<script>
function wp(f) {
if (f.w_point.value)
{
temp_point = parseInt(f.w_point.value);
if (temp_point < 0) {
alert("포인트를 0 이상 입력하세요.");
f.w_point.select();
return false;
}
if (temp_point > <?php echo (int)$member['mb_point']; ?>) {
alert("회원님의 포인트보다 많이 신청할 수 없습니다.");
f.w_point.select();
return false;
}
}
}
</script>
이렇게 코드를 짰는데요 알러트 부분이 정상동작하지 않아요
뭐가 문제일까요?
!-->
답변을 작성하시기 전에 로그인 해주세요.