value 属性可设置或返回单选按钮的 value 属性的值。
radioObject.value=sometext
<html>
<head>
<script type="text/javascript">
function check(browser)
{
document.getElementById("answer").value=browser
}
</script>
</head>
<body>
<p>What's your favorite browser:</p>
<form>
<input type="radio" name="browser" onclick="check(this.value)"
value="Internet Explorer" />Internet Explorer<br />
<input type="radio" name="browser" onclick="check(this.value)"
value="Firefox" />Firefox<br />
<input type="radio" name="browser" onclick="check(this.value)"
value="Netscape" />Netscape<br />
<input type="radio" name="browser" onclick="check(this.value)"
value="Opera" />Opera<br />
<br />
Your favorite browser is: <input type="text" id="answer" size="20" />
</form>
</body>
</html>