<html>
<head>
<title>单选按钮(radio)的取消与选中</title>
</head>
<body>
<form>
<input type="radio" name='radio' value="1" οnclick='check(this)'>单选一
<input type="radio" name='radio' value="2" οnclick='check(this)'>单选二
</form>
<script language="javascript">
var tempradio= null;
function check(checkedRadio)
{
if(tempradio== checkedRadio){
tempradio.checked=false;
tempradio=null;
}
else{
tempradio= checkedRadio;
}
}
</script>
</body>
</html>