Microsoft VBScript 编译器错误 (0x800A03F2)
/asp1/list2.asp, 第 18 行, 第 13 列
objrs.fields.(j-1).value=a(j)
------------^
我的原代码:
<body>
<form align=center method="post" name="frml" action="list2.asp">
<table border="1" align="center" cellpadding="4" height="390">
<tr><td width="100"><td width="195">
<%
sub showpage(objrs,no,a)
objrs.absoluteposition=no
if len(a)>0 then
for j=1 to objrs.fields.count
objrs.fields.(j-1).value=a(j)
next
objrs.update
end if
for j=0 to objrs.fields.count-1
data ="<tr><td>"& objrs.fields(j).name
data=data&"<td><input type=text name="txt" value="& objrs.fields(j).value &">"
response.write data
next
end sub
set conn=server.CreateObject("adodb.connection")
cs ="provider=microsoft.jet.oledb.4.0;data source="
conn.connectionstring=cs & server.MapPath("rsgl.mdb")
conn.open
set rs=server.CreateObject("adodb.recordset")
rs.open"职工工资",conn,1,2,2
if session("no") ="" then
session("no")=1
end if
showpage rs,session("no"),request.form("txt")
response.write"</table>"
rs.close
conn.close
%>
<table border=0 align=center height=50>
<tr><td><input type=submit value="确定修改">
</table>
<script for=txt event=onchange language=vbscript>
w=ccur(frm1.txt(3).value)+frm1.txt(4).value+frm1.txt(5).value+frm1.txt(6).value
w=w-frm1.txt(7).value-frm1.txt(8).value
frm1.txt(9).value=w
</script>
</form>
</body>
为什么会这样?