这段js代码是什么意思??
<script language = "JavaScript">
var onecount;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("数据库字段"))%>","<%= trim(rs("数据库字段"))%>","<%= trim(rs("S数据库字段"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.SmallClassName.length = 1;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.SmallClassName.options[document.myform.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
function CheckForm()
{
if (editor.EditMode.checked==true)
document.myform.Content.value=editor.HtmlEdit.document.body.innerText;
else
document.myform.Content.value=editor.HtmlEdit.document.body.innerHTML;
if (document.myform.Title.value=="")
{
alert("姓名不能为空!");
document.myform.Title.focus();
return false;
}
if (document.myform.Content.value=="")
{
alert("简介内容不能为空!");
editor.HtmlEdit.focus();
return false;
}
return true;
}
function loadForm()
{
editor.HtmlEdit.document.body.innerHTML=document.myform.Content.value;
return true
}
</script>
上面的是js代码
下面的是表单
<body leftmargin="5" topmargin="10" onLoad="javascipt:setTimeout('loadForm()',1000);">
<form method="POST" name="myform" onSubmit="return CheckForm();" action="ArticleSave.asp?action=add" target="_self">
<select name="BigClassName" onChange="changelocation(document.myform.BigClassName.options[document.myform.BigClassName.selectedIndex].value)" size="1"
</select>
<select name="SpecialName"> </select>
<input name="Title" type="text" id="Title" size="80" maxlength="255">
<input name="Author" type="text" id="Author" size="66" maxlength="30">
<input name="Editor" type="hidden" id="Editor" value="">
<input name="CopyFrom" type="text" id="CopyFrom" size="66" maxlength="255">
<textarea name="Content" style="display:none"></textarea>
<input name="IncludePic" type="checkbox" id="IncludePic" value="yes">
<input name="DefaultPicUrl" type="text" id="DefaultPicUrl" size="56" maxlength="200">
<select name="DefaultPicList" id="DefaultPicList" onChange="DefaultPicUrl.value=this.value;"></select>
<input name="UploadFiles" type="hidden" id="UploadFiles">
<input name="Passed" type="checkbox" id="Passed" value="yes" checked>
<input name="OnTop" type="checkbox" id="OnTop" value="yes">
<input name="Hot" type="checkbox" id="Hot" value="yes" onClick="javascript:document.myform.Hits.value=<%=HitsOfHot%>">
<input name="Elite" type=checkbox id="Elite" value="yes" checked>
<input name="Hits" type="text" id="Hits" value="0" size="10" maxlength="10">
<input name="UpdateTime" type="text" id="UpdateTime" value="<%=now()%>" maxlength="50">
<input name="Add" type="submit" id="Add" value=" 添 加 " onClick="document.myform.action='ArticleSave.asp?action=add';document.myform.target='_self';">
<input name="Preview" type="submit" id="Preview" value=" 预 览 " onClick="document.myform.action='../Admin_Preview.asp';document.myform.target='_blank';">
</form>