RadioButton取值的问题
请看下面的程序,十分简单。我想使用javascript根据HTML表单的radiobutton的"value"不同,而取出RadioButton的value,可为何总调试不出。那位高手能给出解决方法?
<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
function CheckRadio(theForm)
{
if (theForm.test.value == "a")
{
alert("Radio Button的值为a");
}
if (theForm.test.value == "b")
{
alert("Radio Button的值为b");
}
}
//--></script><!--webbot BOT="GeneratedScript" endspan -->
<form method="POST" onsubmit="return CheckRadio(this)" action="test_Radio.php" >
<p><input type="radio" name="test" value="a" checked>a</p>
<p><input type="radio" name="test" value="b">b</p>
<p><input type="submit" value="提交" name="B1"></p>
</form>