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

用了basepath,在chrome,firefox上均正常,惟独操蛋的IE不行

2013-02-17 
用了basepath,在chrome,firefox下均正常,惟独操蛋的IE不行%String path request.getContextPath()Stri

用了basepath,在chrome,firefox下均正常,惟独操蛋的IE不行


<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<base href="<%=basePath%>">



<img src="images/gmmb.jpg" width="53" height="44" alt="用了basepath,在chrome,firefox上均正常,惟独操蛋的IE不行" />


用的相对路径在IE下得不到图片, 其他浏览器正常
在IE下的地址变成
"http://%20http//localhost:80/selfservice/images/gmmb.jpg"
[解决办法]
那你只有对IE做特殊处理了

热点排行