首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

碰到的变态有关问题 window.open 乱码

2012-10-07 
碰到的变态问题 window.open 乱码[colorred][/color]A页面:function popupPage(url, width, height){var

碰到的变态问题 window.open 乱码
[color=red][/color]A页面:
function popupPage(url, width, height){
var width = width;
var height = height;
  var left = (screen.width/2) - width/2;
var top = (screen.height/2) - height/2;
var styleStr = 'toolbar=no,location=no,directories=auto,status=yes,menubar=no,scrollbars=yes,resizable=yes,z-lock=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+left;
window.open(url,"", styleStr);
}

onclick="popupPage('xxx.jsp?columnId=${param.columnId}&columnName=${param.columnName}'

B页面:
获取: ${param.columnName}  中文乱码 ..

后来突然在: ${param.columnName}前面加了个小横杠 - 居然就不乱码了! 真是神奇啊!

columnName=-${param.columnName}, 其实在${param.columnName}随便加一个字母也可以做到不乱码? 真不知道怎么回事!

如果页面用window.location.href 跳转,而不是window.open 也一样不会乱码!
真是神奇啊....

热点排行