Re: [問題] 有關radio的問題
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript" type="text/javascript">
<!--
function foo(){
var arr = document.form1.myOption;
for(var i = 0, cb; cb = arr[i]; i++)
{
if(cb.checked)
window.location = cb.value;
}
}
-->
</script>
</head>
<body>
<form name="form1">
<input type="radio" name="myOption" value="go_me.htm" checked/>go me
<input type="radio" name="myOption" value="no_go_me.htm" />no! go me
<input type="radio" name="myOption" value="wanna_go_me.htm" />die bitch! go me
<br/>
<input type="button" value="gogogo!" onClick="javascript:foo();"/>
</form>
</body>
</html>
----
心情不太好.....
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 211.72.111.115
Web_Design 近期熱門文章
PTT數位生活區 即時熱門文章