我是JavaScript的新手。
我有一个textBox和radioButton。
如果我单击textBox,则应该单击radioButton。
有什么例子吗?
最佳答案
这应该做的工作:
<html>
<head>
<script type="text/javascript">
function boo()
{
document.all.myRadioButton1.checked = true;
}
</script>
</head>
<body>
<input type="text" value="some text" onclick="boo()">
<input type="radio" id="myRadioButton1">
</body>
</html>