Recognize the Request ("XXX") in the ASP)

xiaoxiao2021-03-06  15

It is always too lazy before writing ASP. I like to get submitted data directly with Request ("xxx"). And so that this is directly acquired data in Form and QueryString. However, when I get a page. Suddenly I found that the obtained data is not I want's data. After watching the code for half a day, I can't make it wrong. I'm too late. Quiet down, I suddenly think of I have written the cookies tag with the JS script. Will you get Request to get this cookies Marking ?? So the script code. Suddenly discovered that Request acquired is the value in the cookies.

After tested that Request, it was also confirmed that this reason. REQUEST ("XXX") method Getting the order of data is: queryString -> form -> cookies. You can get it afterwards. If the data obtained in front is an empty value (note is not empty characters) Skewer). The next data is obtained.

The test code is as follows:

<% Response.cookies ("page") = "cookies" response.write request ("page")%>

转载请注明原文地址:https://www.9cbs.com/read-65325.html

New Post(0)