关于<input type=radio>传值的问题
答案:4 悬赏:40
解决时间 2021-03-14 04:38
- 提问者网友:欺烟
- 2021-03-13 20:09
关于<input type=radio>传值的问题
最佳答案
- 二级知识专家网友:深街酒徒
- 2021-03-13 20:44
全部回答
- 1楼网友:神也偏爱
- 2021-03-14 00:19
<script type="text/javascript">
function ch(){
var url=document.forms[0];
if(url.xb1[0].checked){
window.location.href="login_1.asp?&xb="+url.xb1[0].value;
}else if(url.xb1[1].checked){
window.location.href="login_1.asp?&xb="+url.xb1[1].value;
}
}
</script>
<body>
<input type="button" onclick="ch()" value="change" />
<form>
<input type=radio name=xb1 value="1" />男<input type=radio name=xb1 value="2">女
</form>
</body>
function ch(){
var url=document.forms[0];
if(url.xb1[0].checked){
window.location.href="login_1.asp?&xb="+url.xb1[0].value;
}else if(url.xb1[1].checked){
window.location.href="login_1.asp?&xb="+url.xb1[1].value;
}
}
</script>
<body>
<input type="button" onclick="ch()" value="change" />
<form>
<input type=radio name=xb1 value="1" />男<input type=radio name=xb1 value="2">女
</form>
</body>
- 2楼网友:慢性怪人
- 2021-03-13 23:15
<input type="radio" name="sex" value="1">
男 </label>
<label>
<input type="radio" name="sex" value="2">
女
男 </label>
<label>
<input type="radio" name="sex" value="2">
女
- 3楼网友:平生事
- 2021-03-13 21:59
<form>
<input type=radio name=xb1 value="1" />男<input input type=radio name=xb1 value="2" />女
<input name="tj" type=submit value="提交">
</form>
<%xb=request("xb1")%>
<script language="javascript">
alert("<%=xb%>")
</script>
<input type=radio name=xb1 value="1" />男<input input type=radio name=xb1 value="2" />女
<input name="tj" type=submit value="提交">
</form>
<%xb=request("xb1")%>
<script language="javascript">
alert("<%=xb%>")
</script>
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯