Joke Collection Website - Public benefit messages - How to deal with the URL of java SMS and how to deal with Chinese garbled code.
How to deal with the URL of java SMS and how to deal with Chinese garbled code.
1, which is coded by the method of escape (field value) at the client, for example:
The copy code code is as follows:
title = escape(encodeURIComponent(title)); //This is a function in js.
url = " & lt% = request . getcontextpath()% & gt; /print/printList! printTable.actiontitle = "+title;
2. On the server side, use java.net.urldecoder.decode (getrequest (). Getparameter ("title"), "UTF-8").
-
The garbled problem of src in parent.window.location.href and iframe.
To transmit Chinese with these two url addresses, it must be encoded first and then decoded.
Code: encodeURI(encodeURI ("string containing Chinese"))
Decoding: java.net.URLDecoder.decode ("string to be decoded", "UTF-8");
- Previous article:Spring Festival couplets
- Next article:How to cancel Unicom 5 yuan SMS monthly subscription package?
- Related articles
- Is there a SMS notification for using China Merchants Bank credit card to advance cash?
- Can mobile companies find text messages?
- Custom iphone ringtone tutorial
- How to send friends circle cake praise?
- When the online loan was overdue, I received a short message from Dingke Law Firm, saying that it was approved, and let me pay attention to the trial in official website court.
- SMS is locked under the phone, but it can't be erased. How to unlock it?
- How to download BBK vivo x5m MMS to SMS?
- Is it free for telecom to check traffic and send messages?
- Have the written test results of Inner Mongolia Agricultural Bank come out?
- What can the public security bureau find through the mobile phone number?