jsp 代碼如下:
複製代碼 代碼如下:
<a id="wd" name="wd" href="javascript:void(0);" onclick="wdQuery()">文檔</a>
<a id="xw" name="xw" href="javascript:void(0);" onclick="xwQuery()">公司新聞</a>
複製代碼 代碼如下:
function wdQuery(){
var keywords= document.getElementById("i-0-keywords").value;
var loginName= document.getElementById("i-0-loginName").value;
//alert("keywords2=="+keywords+"-loginName=="+loginName);
keywords=encodeURI(keywords);
keywords=encodeURI(keywords);
loginName=encodeURI(keywords);
loginName=encodeURI(keywords);
// alert("keywords2=="+keywords+"-loginName=="+loginName);
$("#wd").attr("href","${ctx}/DispatchAction.do?serviceName=SearchWeb&efFormEname=FS01&methodName=query&i-0-moduleId=bmoa_bmdc&i-0-keywords="+keywords+"&i-0-loginName="+loginName);
}
function xwQuery(){
var keywords= document.getElementById("i-0-keywords").value;
var loginName= document.getElementById("i-0-loginName").value;
// alert("keywords2=="+keywords+"-loginName=="+loginName);
keywords=encodeURI(keywords);
keywords=encodeURI(keywords);
loginName=encodeURI(keywords);
loginName=encodeURI(keywords);
// alert("keywords2=="+keywords+"-loginName=="+loginName);
$("#xw").attr("href","${ctx}/DispatchAction.do?serviceName=SearchWeb&efFormEname=FS01&methodName=query&i-0-moduleId=bmoa_bair&i-0-keywords="+keywords+"&i-0-loginName="+loginName);
}
後台代碼如下:
複製代碼 代碼如下:
String keywords=info.getCellStr("i", 0, "keywords");
keywords=URLDecoder.decode(keywords,"UTF-8");