实现接受全由代码生成的页面传值与接收

来源:互联网 发布:无锡网店美工培训 编辑:程序博客网 时间:2024/05/01 00:11

最重要的:  在由数据库读得代码后如:一输入框后,在最后加以下函数

<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

 

 

个人签名:烟台网站制作    烟台网站建设  烟台网络公司

原创粉丝点击