javascript asp教程第八课--request对象

2019-01-13 23:00:51王冬梅
Request("WebPageVariable") and Request.QueryString("QueryVariable") can be abbreviated as Request("QueryVariable").

ServerVariables:

Server Variables represent the HTTP Headers sent to the server by the client. I won't demonstrate them all, because there are too many.

<%@LANGUAGE="JavaScript"%>
<HTML>
<TABLE BORDER="1">
<TR><TD>ALL_RAW</TD>
<TD><%=Request.ServerVariables("ALL_RAW")%></TD></TR>
<TR><TD>REMOTE_ADDR</TD>
<TD><%=Request.ServerVariables("REMOTE_ADDR")%></TD></TR>
<TR><TD>HTTP_USER_AGENT</TD>
<TD><%=Request.ServerVariables("HTTP_USER_AGENT")%></TD></TR>
<TR><TD>URL</TD>
<TD><%=Request.ServerVariables("URL")%></TD></TR>
</TABLE>
</HTML>

Click Here to run the script in a new window.

Demonstrated above are four (4) server variables. There are (give or take) about 50 server variables available. You can look up the full list of server variables for yourself on the internet.

Misc. Notes:

Request.BinaryRead() is the lone method and TotalBytes is the lone property. Request.BinaryRead(Request.TotalBytes) retrieves data from an HTML form using "POST." You must supply the TotalBytes as an argument. It stores the data into an array. BinaryRead cannot be used at the same time as Request.Form().

您可能感兴趣的文章:

ASP中Request对象获取客户端数据的顺序(容易忽略)Asp.net内置对象之Request对象(概述及应用)Asp.net内置对象之Server对象(概述及应用)Asp.net response对象与request对象使用介绍ASP.NET 使用application与session对象写的简单聊天室程序ASP.NET中Application全局对象用法实例浅析ASP.NET中使用Application对象实现简单在线人数统计功能ASP的Error对象知识简析ASP基础知识Command对象讲解ASP基础入门第六篇(ASP内建对象Request)