87,910
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<script type="text/javascript">
function check(obj)
{
//获取当前是哪一行
var curTr=obj.parentNode.parentNode;
//alert(curTr.outerHTML);
var cutTrTd=curTr.getElementsByTagName("TD");
//alert(cutTrTd.length);
for(var i=0;i<cutTrTd.length;i++)
{
if(cutTrTd[i]!=obj.parentNode)
{
cutTrTd[i].childNodes[0].checked=false;
}
}
}
</script>
<BODY>
<TABLE id="tbl">
<TR>
<TD>
<input type="radio" name="radiobutton1" value="UserName" onclick="check(this)"/>
</TD>
<TD>
<input type="radio" name="radiobutton2" value="UserName" onclick="check(this)"/>
</TD>
<TD>
<input type="radio" name="radiobutton3" value="UserName" onclick="check(this)"/>
</TD>
<TD>
<input type="radio" name="radiobutton4" value="UserName" onclick="check(this)"/>
</TD>
</TR>
<TR>
<TD>
<input type="radio" name="radiobutton1" value="familyName" onclick="check(this)"/>
</TD>
<TD>
<input type="radio" name="radiobutton2" value="familyName" onclick="check(this)"/>
</TD>
<TD>
<input type="radio" name="radiobutton3" value="familyName" onclick="check(this)"/>
</TD>
<TD>
<input type="radio" name="radiobutton4" value="familyName" onclick="check(this)"/>
</TD>
</TR>
<TR>
<TD> <input type="radio" name="radiobutton1" value="givenName" onclick="check(this)"/> </TD>
<TD><input type="radio" name="radiobutton2" value="givenName" onclick="check(this)"/> </TD>
<TD> <input type="radio" name="radiobutton3" value="givenName" onclick="check(this)"/> </TD>
<TD><input type="radio" name="radiobutton4" value="givenName" onclick="check(this)"/> </TD>
</TR>
</TABLE>
</BODY>
</HTML>