国产探花免费观看_亚洲丰满少妇自慰呻吟_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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 奉节县| 津市市| 中山市| 鄯善县| 黄大仙区| 淅川县| 新巴尔虎右旗| 宜兴市| 北票市| 桐乡市| 永兴县| 南召县| 灵山县| 东方市| 临泉县| 扎兰屯市| 社会| 阿坝县| 翼城县| 堆龙德庆县| 巴中市| 朝阳区| 秭归县| 万山特区| 阳朔县| 托克逊县| 孝感市| 始兴县| 武安市| 东城区| 温宿县| 拉孜县| 马公市| 环江| 六盘水市| 休宁县| 邢台县| 海兴县| 资兴市| 西贡区| 平阴县|