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

首頁 > 編程 > ASP > 正文

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

2024-05-04 10:58:20
字體:
來源:轉載
供稿:網友

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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 开阳县| 台山市| 安顺市| 新宁县| 大宁县| 依兰县| 桐城市| 鞍山市| 柞水县| 娱乐| 陇南市| 吴川市| 孟州市| 西和县| 灵川县| 江都市| 大姚县| 马鞍山市| 新晃| 咸宁市| 山阳县| 青冈县| 勐海县| 桓仁| 东海县| 习水县| 英德市| 镇坪县| 彝良县| 金塔县| 酉阳| 五峰| 百色市| 巫溪县| 佛山市| 固阳县| 吴堡县| 海宁市| 开远市| 托克托县| 保山市|