红粒炊畲粟,青烟郁涧薪。得床思熟睡,寒犬苦狺狺。一生之中至少要有两次冲动,一次为奋不顾身的爱情,一次为说走就走的旅行。
jsp 代码如下:
<a id="wd" name="wd" rel="nofollow noopener noreferrer" href="javascript:void(0);" onclick="wdQuery()">文档</a>
<a id="xw" name="xw" rel="nofollow noopener noreferrer" 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");
到此这篇关于javascriptp传值本地无乱码测试机出现乱码问题如何解决就介绍到这了。拥有知识改变命运,拥有理想改变态度。更多相关javascriptp传值本地无乱码测试机出现乱码问题如何解决内容请查看相关栏目,小编编辑不易,再次感谢大家的支持!