Request物件的使用

2021-04-12 23:42:23 字數 2825 閱讀 4659

response.write(

"客戶端的作業系統:"+

request.browser.platform +"

");                               

//winnt

response.write(

"客戶端用的瀏覽器:"+

request.browser.browser +"

");                                

//ie

response.write(

"客戶端瀏覽器的版本:"+

request.browser.version +"

");                               

//6.0

response.write(

"客戶端framework的版本:"+

request.browser.clrversion.tostring()+"

");                 

//2.0.50727   

response.write(

"客戶端瀏覽器是否有後退按鈕:"+

request.browser.hasbackbutton.tostring()+"

");         

//true

response.write(

"判斷客戶端瀏覽器型別:"+

request.browser.isbrowser("ie

").tostring () +"

");          

//true   (大小寫沒差別)

response.write(

"判斷客戶端是幾位機:"+

((request.browser.win16

==true)?

"16位機":

"32位機") 

+"");     

//32位機

//response.write(""+request.contentencoding.encodingname+"

");response.write(""

++""

);                                

///study1

response.write(""

++""

);            

//~/default.aspx   

response.write(

"currentexecutionfilepath當前請求的虛擬路徑: "+

request.currentexecutionfilepath +"

");                         

///study1/textpath/path.aspx

response.write(""

++""

);            

//c:documents and settingsadministratormy documentsvisual studio 2005

response.write(

"原始url位址(包括url的引數)request.rawurl"+

request.rawurl+"

");                               

///study1/default3.aspx?type=dddd 

response.write(

"物理檔案路徑physicalpath:"+

request.physicalpath +"

");                                        

//c:documents and settingsadministratormy documentsvisual studio 2005websitesstudy1default3.aspx

response.write(""

++""

);    

//c:documents and settingsadministratormy documentsvisual studio 2005websitesstudy1

response.write(""

++""

);  

//c:documents and settingsadministratormy documentsvisual studio 2005websitesstudy1in

response.write(""

+"default3.aspx") 

+"");     

//c:documents and settingsadministratormy documentsvisual studio 2005websitesstudy1default3.aspx

response.write(

"獲取絕對的uri:request.url.absoluteuri"+

"獲取主機名:埠號"+

request.url.authority +"

");                                       

//localhost:1035+"

abc.xml", 

true

);//儲存

Request物件的使用

response.write 客戶端的作業系統 request.browser.platform winnt response.write 客戶端用的瀏覽器 request.browser.browser ie response.write 客戶端瀏覽器的版本 request.browser.ver...

Request物件的使用

出自 response.write 客戶端的作業系統 request.browser.platform winnt response.write 客戶端用的瀏覽器 request.browser.browser ie response.write 客戶端瀏覽器的版本 request.browser....

使用request物件獲取表單的資訊

通過request物件可以獲取表單中的輸入資訊,並將這些資訊存入到指定的字串中去 例如有下面乙個表單 用request物件獲取表單中的輸入資訊的 如下 string verifycodedigit string type user admin string username string userp...