日期:2014-05-16  浏览次数:20348 次

window.showModalDialog 传递的url中包含中文问题
window.showModalDialog(src,"","location:No;status:No;help:No;dialogWidth:400;dialogHeight:400;scroll:no;"); 

为什么我传递的src中包含中文,显示出来是乱码?

------解决方案--------------------
路径带中文是需要转码的。

前台:
var msg=window.showModalDialog("urlDecode.do?name=<%=URLEncoder.encode(URLEncoder.encode("哈哈")) %>","",sFeatures);

后台:
System.out.println(URLDecoder.decode(request.getParameter("name")));