안녕하세요 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개
게시글 목록
| 번호 | 제목 |
|---|---|
| 284172 | |
| 284170 | |
| 284167 | |
| 284164 | |
| 284161 | |
| 284159 | |
| 284155 | |
| 284152 | |
| 284151 | |
| 284148 | |
| 284142 | |
| 284141 | |
| 284137 | |
| 284136 | |
| 284135 | |
| 284127 | |
| 284121 | |
| 284120 | |
| 284116 | |
| 284115 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기