1.首先进行传参数
function detailedsearch(){
searchContents = $("#searchContents").val();
var b = “http://localhost:8081/finms/addDetailed?”+searchContents;
return window.location.href = b;
}
2.在跳转之后的页面
//获取请求参数名称
var searchContents = window.location.search.substr(1);
//因为是中文,进行转码
alert(decodeURIComponent(searchContents));
其实用 decodeURIComponent 就好了