알러트 동작 문제 채택완료
블랑숑
5년 전
조회 2,453
</p>
<p>
<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></p>
<p><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></p>
<p>
이렇게 코드를 짰는데요 알러트 부분이 정상동작하지 않아요
뭐가 문제일까요?
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
답변을 작성하려면 로그인이 필요합니다.
로그인
버튼에 onclick="document.pressed=this.value"
이렇게 넣어도 안되는데 혹시 어떻게 해야 하는건가요?