作者lastoct (lastoct)
看板Web_Design
標題Re: [問題] 有關radio的問題
時間Mon Apr 11 19:12:23 2005
<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