就是当你选择了一个checkbox后一定要选择一个radio box
试了很久都不成功
网上也找不到相关例子
下面是我一些不完整avascipt code
哪帮高手帮帮忙
<HTML><HEAD>
<SCRIPT>
<!--
function show(theform) {
var interest_len = theform.interest.length;
var intr = ""
for (var i = 0 ; i < interest_len ; i++) {
if (theform.interest[i].checked) {
intr += theform.interest[i].value + " "
}
}
// validate Radio object
var selected = false
var radiolength = theform.thesex.length
for (var i=0 ; i < radiolength ; i++)
if (theform.interest[i].checked)
theform.thesex[i].checked
selected = true
eles {select = false
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<FORM name=myform>Interest <BR>
<INPUT type=checkbox value=Computing name=interest>Computing<BR>
<INPUT type=checkbox value=Music name=interest>Music<BR>
<INPUT type=checkbox value=Sports name=interest>Sports<BR>
Sex: <INPUT type=radio value=Male name=thesex>Male
<INPUT type=radio value=Female name=thesex>Female
<INPUT type=radio value=SECRET name=thesex>I won't tell you :) <BR><BR>
<INPUT onclick=show(this.form) type=button value="Click me to see the result"> </FORM></BODY></HTML>