【ASP】asp中变量、requst参数在html、asp、sql中的调用格式

发布于:2024-06-01 ⋅ 阅读:(69) ⋅ 点赞:(0)

一、html页面 - 变量

<input name="T_ID" type="hidden" value="<%=T_ID%>">

<input name="T_ID" type="hidden" value="<%=T_ID%>">

二、html页面 - requst参数

		<input type="hidden" name="moduleid" value="<%= request("moduleid")%>">

三、asp页面

	Search=request.QueryString("Search")
	   	  T_SDate2=request("T_SDate2")
	response.write "<script language='javascript'>alert('操作成功');location.href='DownList.asp?moduleid="&request("moduleid")&"';</script>"
sql="SELECT * FROM "&table&" WHERE T_ID = '"&T_ID&"'"

四、asp页面 - sql变量和取字段值

sql="SELECT * FROM "&table&" WHERE T_ID = '"&T_ID&"'"
	set rs=conn.execute(sql)
	if not rs.eof then
		T_CardID=rs("T_CardID")
		T_Description=rs("T_Description")
	end if
	set rs=nothing
 sql= "select * from RC_TaskTrip where ID="&request("id")

五、asp页面 - 日志

   			    ' 插入日志 csj_log
   
				Dim sqlInsert
				sqlInsert = "INSERT INTO csj_log (Bh, Name, Class,JdName) VALUES ('"&T_ID&"', '撤销奖励申请', '修改','"&session("name")&"')"
				' 执行 SQL 插入
				conn.execute(sqlInsert)
	

六、超链接引用

  <a style="color:blue;" href="admin_orderEdit.asp?T_ID=<%= T_ID %>&moduleid=<%= moduleid%>&action=nopass">修改</a>    

  <a style="color:blue;" href="admin_orderEdit.asp?T_ID=<%= T_ID %>&moduleid=<%= moduleid%>&action=nopass">修改</a>         

    

 <td>&nbsp;<a href="#" onClick="window.showModalDialog('SFZjdxx_hs.asp?T_ID=<%= T_ID %>&T_GuideID=<%= rs_sum("jdshibiehao") %>&shtype=<%= rs_sum("shtype") %>&shcompany=<%= rs_sum("shcompany") %>',document.forms[0],'dialogHeight:30em;dialogWidth:40em;status=0');">


网站公告

今日签到

点亮在社区的每一天
去签到