b1 = new Array()
<%
i = 0
while not rs.eof
Response.Write "b1[" & i & "] = '" & rs("b1") & "'" & vbCrLf
rs.movenext
i = i+1
wend
%>
<%
i = 0
while not rs.eof
Response.Write "b1[" & i & "] = '" & rs("b1") & "'" & vbCrLf
rs.movenext
i = i+1
wend
%>
validity = true;
if(chknbr(document.softform.SID1.value)==false)
{validity= false;
alert('分值正确');}
else{
alert('分值有误');
}
return validity;
}function chknbr(nbr)
{
var i=nbr.length;
var status
return(nbr.charAt(i-1)=='.')}function chkifnmb()//只允许输入数字。
{var isNS4 = (navigator.appName=="Netscape")?1:0;
if(!isNS4)
{if(event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;}
else{
if(event.which < 45 || event.which > 57)
return false;
}
}
function textCounter(theField,theCharCounter,theLineCounter,maxChars,maxLines,maxPerLine)//描述的字数限制
{var strTemp = "";var strLineCounter = 0;var strCharCounter = 0;
for (var i = 0; i < theField.value.length; i++)
{var strChar = theField.value.substring(i, i + 1);
if (strChar == '\n')
{strTemp += strChar;strCharCounter = 1;strLineCounter += 1;}
else if (strCharCounter == maxPerLine)
{ strTemp += '\n' + strChar;
strCharCounter = 1;
strLineCounter += 1;}
else
{ strTemp += strChar;
strCharCounter ++;
}
}
theCharCounter.value = maxChars - strTemp.length;
theLineCounter.value = maxLines - strLineCounter;
} </script>
<form name="softform" onSubmit="return checkform()" method=post> <table bgcolor=#ffffff bordercolor=#0000ff border=1 align=center style='border-collapse: collapse;' width=380 height=170>
<tr>
<td class=td width="6%" align=center>
</td>
<td class=td width="14%" >描述与自信分值</td>
<td class=td align=center width="61%" rowspan=2>描 述</td>
<td class=td align=center width="8%" rowspan=2>要素分值</td>
<td class=td align=center width="9%" rowspan=2>每面分值</td>
</tr>
<tr>
<td colspan=2 height="17" >
123
</td>
</tr>
<tr >
<td rowspan=4 class=c>自我</td>
<td class=c >经验</td>
<td >
<textarea class=txt rows=2 maxLength='50' name='jy' tabindex="1" title="自己的经验完全覆盖了当前的决策任务" onKeyUp="textCounter(theForm.myText,theForm.remChars,remLines,50,20,100);"></textarea></td>
<td >
<input type="text" class=txt2 maxLength='5' size='4' name='SID1' tabindex="2" value=0 onKeypress="chkifnmb()"></td>
<td rowspan=4 class=c >
<input type="text" maxLength='5' size='4' name='SID5' tabindex="9" value=0 class=txt2 onKeypress="chkifnmb()" ></td>
</tr>
<tr>
<td class=c >知识</td>
<td class=c >
<textarea class=txt rows=2 maxLength='50' name='jy' tabindex="3" title="根本没有学过有关知识"></textarea></td>
<td class=c ><input type="text" class=txt2 maxLength='5' size='4' name='SID2' tabindex="4" value=0 onKeypress="chkifnmb()"></td>
</tr>
<tr>
<td class=c>信息</td>
<td class=c><textarea class=txt rows=1 maxLength='50' name='jy' tabindex="5" title="自己的经验完全覆盖了当前的决策任务"></textarea></td>
<td class=c><input type="text" class=txt2 maxLength='5' size='4' name='SID3' tabindex="6" value=0 onKeypress="chkifnmb()"></td>
</tr>
<tr>
<td class=c>思维方法</td>
<td class=c><textarea class=txt rows=1 maxLength='50' name='jy' tabindex="7" title="自己的经验完全覆盖了当前的决策任务"></textarea></td>
<td class=c><input type="text" class=txt2 maxLength='5' size='4' name='SID4' tabindex="8" value=0 onKeypress="chkifnmb()"></td>
</tr>
</table>
<p>
<input type="submit" name="Submit" value="确定" tabindex="10"><input type="reset" value="清除" name="reset" tabindex="11"></p>
<% function chk()%>
</table>
我想判断,分值的有效性,可我只能做到一个。
将来还得保存数据库。
头大阿。
谁来帮帮阿。