<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<script type="text/javascript">
function checkradio(){
var hiddenvalue = document.getElementById("hidden1");
var radiovalue = document.getElementsByName("radiobutton");
for ( var i = 0; i <= radiovalue.length; i++ ){
//alert(hiddenvalue.value);
if ( radiovalue[i].value == hiddenvalue.value )
radiovalue[i].checked = true;
}
}
</script>
<body onload="checkradio()">
<input type="radio" name="radiobutton" id="radiobutton" value="1" />
<input type="radio" name="radiobutton" id="radiobutton" value="2" />
<input type="radio" name="radiobutton" id="radiobutton" value="3" />
<input type="radio" name="radiobutton" id="radiobutton" value="4" />
<input type="hidden" name="hidden1" id="hidden1" value="3"/>
</body>
</html>
测试成功!