简单单选框——有个网友让做的

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<SCRIPT language="JavaScript" type="text/javascript">
function check(id01,id02,id03){
//alert(id01);
if(document.getElementById(id01).checked==true){

document.getElementById(id01).checked=false;
document.getElementById(id02).checked=false;
document.getElementById(id03).checked=false;
}else {
document.getElementById(id01).checked=true;
document.getElementById(id02).checked=false;
document.getElementById(id03).checked=false;
}
}
</SCRIPT>
</head>
<body>
<br/>
<nobr><input type='checkbox' name='actorTypes' id="1" value='S' onblur="check(1,2,3);" checked>Workflow Submitter01</nobr><br/>
<nobr><input type='checkbox' name='actorTypes' id="2" value='S' onblur="check(2,1,3);">Workflow Submitter02</nobr><br/>
<nobr><input type='checkbox' name='actorTypes' id="3" value='S' onblur="check(3,1,2);">Workflow Submitter03</nobr><br/>

</body>
</html>
原文地址:https://www.cnblogs.com/dkblog/p/1980999.html