这段asp代码哪里错了

来源:百度知道 编辑:UC知道 时间:2024/05/22 08:18:14
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function loginInput()
{
if (!IsNumeric(form1.oicq.value))
{
alert("QQ号必须是数字形式!");
form1.oicq.focus();
return (false);
}
return true;
}
//-->
</SCRIPT>

'已经存在form1和oicq文本框
请写出正确的代码
form1中已经有代码为
<form onSubmit="return loginput()">
</form>
form是完整的

isNumeric 不是js代码

另外要注意大小写和引号要求严格

<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function loginInput()
{
if (isNaN(form1.oicq.value))
{
alert("QQ号必须是数字形式!");
form1.oicq.focus();
return false;
}
return true;
}
//-->
</SCRIPT>
<form id="form1" name="form1" method="post" action="" onsubmit="return loginInput();">
<input name="oicq" type="text" id="oicq" />
</form>