vbscript中多个radiobutton控件如何实现单选?

来源:百度知道 编辑:UC知道 时间:2024/05/30 17:13:58
我在一个表单中加入了两个radiobutton控件,但是在选择时,两个radiobutton总是都有小黑点,怎么办?
比如说这段代码:
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<form name="frm1" method="post" action="">
<p>
<input type="radio" name="radiobutton1" value="radiobutton" checked>
a</p>
<p>
<input type="radio" name="radiobutton2" value="radiobutton">
b</p>
<p>
<input type="text" name="textfield">
</p>
<input type="button" name="button1" value="按钮">
<script language="vbscript">
sub button1_onclick()

<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<form name="frm1" method="post" action="">
<p>
<input type="radio" name="radiobutton" value="radiobutton" id="r1" checked>
a</p>
<p>
<input type="radio" name="radiobutton" value="radiobutton" id="r2">
b</p>
<p>
<input type="text" name="textfield">
</p>
<input type="button" name="button1" value="按钮">
<script language="vbscript">
sub button1_onclick()
if document.frm1.r1.checked then frm1.textfield.v