When using "get", the crawled page is finally encoded with the encoding type
Code as follows: <% server-side: Servletactioncontext.getresponse (). setcharacterencoding ("Utf-8"); client page effects p/ jsp.html target=_blank >jsp Tutorial: <%@ page language= "java" contenttype= "text/html"; Charset=utf-8 "pageencoding=" utf-8 "%> response.expires = -9999 Response.AddHeader" Pragma "," No-cache " Response.AddHeader "Cache-ctrol", "No-cache" Response.AddHeader "Content-type", "text/html"; charset=gb2312 "' This is the key, otherwise there will be garbled Response.Write" Chinese characters "%> 2, in the use of the post with VBScript to solve the coding problem: source code is as follows: Code as follows: <script language= "VBScript" > function urlencoding (vstrin) Strreturn = "" for i = 1 to Len (vstrin) THISCHR = Mid (vstrin,i,1) If ABS (ASC (THISCHR)) < &hff then Strreturn = Strre Turn & thischr else innercode = ASC (THISCHR) if Innercode < 0 then Innercode = innercode + &h10000 End if Hight8 = (Innercode and &hff00) &hff low8 = Innercode and &Amp;hff Strreturn = strreturn & "%" & Hex (HIGHT8) & "%" & Hex (LOW8) end if next URL encoding = strreturn End function function Bytes2bstr (vin) Strreturn = "" For i = 1 to LenB (VIN) &N Bsp Thischarcode = ASCB (MidB (vin,i,1)) If Thischarcode < &h80 then Strreturn = strreturn & Chr (Thischar Code) else Nextcharcode = ASCB (MidB (vin,i+1,1)) Strreturn = Strreturn & Chr (CLng (thischarcode) * &A mp;h100 + CInt (nextcharcode)) i = i + 1 end if next bytes2bstr = strreturn End function  ; </script> Below is the use of VBScript functions: code as follows: <script language= Web Effects > /** * Initializes a XMLHTTP object */ function Initajax () { var ajax=false; try { ajax = new ActiveXObject ("Msxml2.xmlhttp"); } catch (e) { try { ajax = new ActiveXObject ("Microsoft.XMLHTTP"); } catch (E) { ajax = false; } } if (!ajax && typeof xmlhttprequest!= ' undefined ') { ajax = new XMLHttpRequest (); }  ; Return ajax; } function saveuserinfo () { var msg = document.getElementById ("msg"); var f = d ocument.user_info; var username = f.user_name.value; var userage = f.user_age.value; var usersex = F.use r_sex.value; var url = "save.asp tutorial"; var poststr = urlencoding ("user_name=" + username + "&user_age=" + user Age + "&user_sex=" + usersex)//post with Encoding pass var ajax = Initajax (); Ajax.open ("post", URL, True); Ajax.setrequestheader ("Content-type", "application/x-www-form-urlencoded"); ajax.send (POSTSTR); Ajax.onreadystatechange = function () { if (ajax.readystate = 4 && ajax.status = =) { msg.innerhtml = Bytes2bstr (ajax.responsebody); Get time decoding } } } </script> <form name= "User_info" > Name: <textarea name= " User_name "/></TEXTAREA><BR/> Age: <input type= "text" name= "user_age"/><br/> Sex: <input Type= "text" name= "User_sex"/><br/> <input type= "button" value= "Submit Form" onclick= "Saveuserinfo ()" > </form> <div id= "MSG" ></div> success