안녕하세요 radio로 포인트로 기간을 구매하는걸 간단하게 만들어보고싶은데
초보라서 뭐가뭔지를 잘 모르겠어서 질문드려요
<script>
function check_frm(){
for(var i=0; i < test_frm.pay_type.length; i++)
if(test_frm.pay_type[i].checked)
alert(test_frm.pay_type[i].value);
}
</script>
<form name=test_frm>
<table>
<tr>
<td><input type=radio name=pay_type checked value=구매완료 > 3일</td>
<td><input type=radio name=pay_type value=구매완료 > 7일</td>
<td><input type=radio name=pay_type value=구매완료 > 30일 </td>
<td><input type=button value="구매하기" onclick="check_frm()" /></td>
</tr>
</table>
</form>
이렇게 form까진 짯는데 그 뒤에 어떻게해야될지를 모르겠어요
제가 하고싶은건 radio로 선택해서 구매하기를 누르면 3일은 차감 100포인트 7일은 200포인트
이런식으로하고싶은데 스킨 질문답변 다 찾아봤는데 비슷한게없는거같아요..
혹시 비슷한 글같은게있으면 그런거라도 알려주시면 감사하겠습니다
초보라서 뭐가뭔지를 잘 모르겠어서 질문드려요
<script>
function check_frm(){
for(var i=0; i < test_frm.pay_type.length; i++)
if(test_frm.pay_type[i].checked)
alert(test_frm.pay_type[i].value);
}
</script>
<form name=test_frm>
<table>
<tr>
<td><input type=radio name=pay_type checked value=구매완료 > 3일</td>
<td><input type=radio name=pay_type value=구매완료 > 7일</td>
<td><input type=radio name=pay_type value=구매완료 > 30일 </td>
<td><input type=button value="구매하기" onclick="check_frm()" /></td>
</tr>
</table>
</form>
이렇게 form까진 짯는데 그 뒤에 어떻게해야될지를 모르겠어요
제가 하고싶은건 radio로 선택해서 구매하기를 누르면 3일은 차감 100포인트 7일은 200포인트
이런식으로하고싶은데 스킨 질문답변 다 찾아봤는데 비슷한게없는거같아요..
혹시 비슷한 글같은게있으면 그런거라도 알려주시면 감사하겠습니다
댓글 3개
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기