国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

javascript asp教程第八課--request對象

2024-05-04 11:01:55
字體:
來源:轉載
供稿:網友

Request Object:

Request has five (5) Collections, one (1) Property, and one (1) Method. You'll use the Collections far more than the property or the method.

Request Collections:

Below is a table of the Request Collections and descriptions of how they are used.

Request Collections
ClientCertificateRequest.ClientCertificate("Key[Field]")
Client security info for SSL encryption
CookiesRequest.Cookies("cookieName")
Holds cookie value stored on the client
FormRequest.Form("formName")
Holds value sent via HTML Form
QueryStringRequest.QueryString("keyName")
Name/Value pair appended to the end of the URL
ServerVariablesRequest.ServerVariables("variableName")
Hold values sent in the HTTP Headers

ClientCertificate:

Request.ClientCertificate is used with S.S.L. (Secure Sockets Layer). It is beyond the scope of this web site.

Cookies:

We will learn Request.Cookies and Response.Cookies together in Lesson 08. Please be patient.

Form:

Request.Form is probably the workhorse of the Request Collections. The first script is a repeat from Lesson 03.

<%@LANGUAGE="JavaScript"%><%//No ASP Here, just a regular HTML Page%><HTML><STRONG>Type something into the text box and submit it.</STRONG><FORM ACTION="script08a.asp" METHOD="Post"><INPUT TYPE="Text" NAME="WebPageVariable"><BR><STRONG>How Much Money do you make each month?</STRONG><BR><SELECT NAME="monthlySalary"><OPTION>Under $5,000,000</OPTION><OPTION>Above $5,000,000</OPTION><OPTION>Nobody's darn business.</OPTION></SELECT><BR><INPUT TYPE="Submit" VALUE="Submit"></FORM></HTML>

Click Here to run script08.asp in a new window. It posts information to script08a.asp which is found below. In turn, script08a.asp posts information to script08b.asp which is also found below.

<%@LANGUAGE="JavaScript"%><%var WebPageVariable = new String( Request.Form("WebPageVariable") )WebPageVariable = WebPageVariable.toUpperCase();var monthlySalary = new String( Request.Form("monthlySalary") )monthlySalary = monthlySalary.toLowerCase();%><HTML>The Web Page Variable you typed is: <%=WebPageVariable%> <BR>The monthly salary you listed is: <%=monthlySalary%> <BR><FORM ACTION="script08b.asp" METHOD="Get"><INPUT TYPE="hidden" VALUE="<%=monthlySalary%>" NAME="QueryVariable"><STRONG>Click the button to see Query Strings</STRONG><BR><INPUT TYPE="submit" VALUE="Submit"></FORM></HTML>

We'll be using Request.Form when we "Post" an HTML form to the server. Notice that the NAME attribute in the HTML form corresponds to the "name" in

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 兰溪市| 乌拉特后旗| 科技| 喀喇| 永福县| 延寿县| 台前县| 孝感市| 安平县| 大邑县| 昌平区| 郑州市| 高安市| 永安市| 盱眙县| 通海县| 宁波市| 白沙| 历史| 临西县| 天峻县| 九龙城区| 定西市| 虎林市| 科尔| 通州区| 栾城县| 丹江口市| 宜阳县| 乌鲁木齐市| 上高县| 凯里市| 九寨沟县| 宁陕县| 新竹市| 沙田区| 镇远县| 开封县| 福州市| 堆龙德庆县| 萝北县|