1. url Direct Reference encodeURI(encodeURI(URIstring))
http://localhost:8080/StandardApiAction_marginGroup.action?value=encodeURI(encodeURI(URIstring))
2. ajax's data parameter (recommend) 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) {
}
});