大致情况:
左边是一棵栏目树,右边是一个iframe,要求点解击栏目树的节点,跳转一个页面显示在iframe
中文传过去为乱码,我界面编码方式是utf-8
JS方法
function choiceChannel(cid,cname){
jQuery("#openDirect_frame").attr("src",encodeURI("/xxx.htm?channelId="+cid+"&channelName=‘栏目名称’"));
}
openDirect_frame为iframeID
使用encodeURI将地址进行转码
xxx.htm页面使用freemarker接收${request.getParameter('channelName')!};
地址加上encodeURI,解决!!!!!