表单如下:<input class="input" id="titlename" type="text" maxLength="50" size="40" name="titlename" runat="server">
function AddRecord()
{
xmlHttp=GetXmlHttpObject();
xmlHttp.onreadystatechange=state3Changed;
var url="../Ajax/GetMaxId.aspx?sta=3";
xmlHttp.open("POST",url,false);
xmlHttp.send(null);
if(trim(document.Form1.titlename.value)=="")
{
alert("获奖主题不能为空!");
Form1.titlename.focus();
return false;
}
}提交时报document.Form1.titlename为空或不是对象,什么原因
function AddRecord()
{
xmlHttp=GetXmlHttpObject();
xmlHttp.onreadystatechange=state3Changed;
var url="../Ajax/GetMaxId.aspx?sta=3";
xmlHttp.open("POST",url,false);
xmlHttp.send(null);
if(trim(document.Form1.titlename.value)=="")
{
alert("获奖主题不能为空!");
Form1.titlename.focus();
return false;
}
}提交时报document.Form1.titlename为空或不是对象,什么原因
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货