1. url直接传参 encodeURI(encodeURI(URIstring))
http://localhost:8080/StandardApiAction_marginGroup.action?value=encodeURI(encodeURI(URIstring))
2. ajax的data传参(推荐) encodeURI(URIstring)
var data = {}
data.value = encodeURI(URIstring)
$.ajax({
url: 'http://localhost:8080/StandardApiAction_marginGroup.action
data: data,
cache:false,
dataType:'json',
success: function (json) {
if(json.result == 0){
alert('Success');
} else {
alert('Failure');
}
},error:function(XMLHttpRequest, textStatus, errorThrown){
}
});