自己查了一下可以使用encodeURI进行解码,但是这个这么解码呢?
var name=%{propertyName};
var url="/ajax?name="+encodeURI(encodeURI(name));
http://jingyan.baidu.com/article/6c67b1d6ee75dc2787bb1e24.html
encode编码,decode解码
byte[] java.lang.String.getBytes(String charsetName) throws UnsupportedEncodingException
getBytes
public byte[] getBytes(String charsetName)
throws UnsupportedEncodingException
Encodes this String into a sequence of bytes using the named charset, storing the result into a new byte array.
The behavior of this method when this string cannot be encoded in the given charset is unspecified. The CharsetEncoder class should be used when more control over the encoding process is required.
Parameters:
charsetName - The name of a supported charset
Returns:
The resultant byte array
Throws:
UnsupportedEncodingException - If the named charset is not supported
Since:
JDK1.1
API 说明