要转两次: var answer = encodeURI(encodeURI($("#answer").val()));
页面接受值的时候:
import java.net.URLDecoder;
obj.setAnswer(URLDecoder.decode(objForm.getAnswer(),"UTF-8"));
要转两次: var answer = encodeURI(encodeURI($("#answer").val()));
页面接受值的时候:
import java.net.URLDecoder;
obj.setAnswer(URLDecoder.decode(objForm.getAnswer(),"UTF-8"));