页面上用jquery ajax
function createQS(name){
var value = encodeURI(name);
var queryString = {key:value};
return queryString;
}
//检索姓名方法
function jiansuoByName(k,name){
if (name == '') {
alert("请输入检索的内容");
return;
}
$.post(basePath+"/sysmgr/searchesAjax/searchesJsonPlugin!searchesNameByOMCByName.action", createQS(name),
function(data){
//alert(data.result+'\n'+k); // John
setLine_memoryFunction_A(data.result,k);
}, "json");
}
----------------------------------------------------------------------------------------
在后台action里
import java.net.URLDecoder;
String _name = request.getParameter("key");
String name = URLDecoder.decode(_name,"utf-8");