最重要的: 在由数据库读得代码后如:一输入框后,在最后加以下函数
<script language="javascript">
function chushihua()
{
<%
for i=1 to ts
z=replace(zhi(i),vbcrlf,"") //此句实现替换其中的回车副
response.Write "document.xghy." & ming(i) & ".value=" & "'" & z & "';" //在js中打出相当与添加一条js命令
next
%>
}
chushihua();
</script>
在接收页从数据库读得名称后:
zh=request("zhanghao")
mm=request("mima")
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select shuxingkz.mingcheng from shuxingkz,shuxing where shuxing.guanlizh='" & zh & "' and shuxingkz.mingcheng=shuxing.mingcheng order by weizhi "
rs.open sql,conn,1,1
ts=cint(rs.RecordCount)
for i=1 to ts
xg="update shuxing set zhi='" & request(rs(0)) & "' where guanlizh='" & zh & "' and mingcheng='" & rs(0) &"'" //分条显示比较强悍`````
conn.Execute xg
'response.Write "<BR>" & xg
rs.movenext
next
gm="update guanli set mima='" & mm & "'where zhanghao='" & zh &"'"
conn.Execute gm