28,409
社区成员




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>表格属性的操作</title>
</head>
<body>
单先A <input onClick="javascript:xdo(this);" type="radio" name="radiobutton" value="10" checked>
单先B <input onClick="javascript:xdo(this);" type="radio" name="radiobutton" value="20">
单先C <input onClick="javascript:xdo(this);" type="radio" name="radiobutton" value="30">
单先D <input onClick="javascript:xdo(this);" type="radio" name="radiobutton" value="0">
<input id="textfield" type="text" name="textfield">
<script language="javascript" type="text/javascript">
function xdo(obj){
if(obj.value=="0")
document.getElementById("textfield").style.display="block";
else
document.getElementById("textfield").style.display="none";
}
</script>
</body>
</html>
if(document.all.radiobutton[3].checked){
document.all.textfield.style.display = "block";
}else{
document.all.textfield.style.display = "none";
}