×

Loading...

嘿嘿,悄悄的告诉你

xanada (㊣流水)
alert(document.form1.browser.value)是不能这样用的。
因为有两个browser,它怎么知道是取哪个value呀?

所以要这样:
for (var i = 0; i < document.forms[0].elements.length; i++)
{
var objElement = document.forms[0].elements[i];
if (objElement.name == "browser" && objElement.checked == true)
alert (objElement.value);
}

另外,JS里面是没有trim方法的,得自己写。
(#259401@0)
2001-11-12 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: 请教一个网页制作的问题。

Back To Forum: HOME枫下论坛枫下论坛主坛枫下家园电脑用户