IP访问一切正常,域名访问页面出现排版错误及无法执行JS代码。谁知道是怎么回事?
百度无果。如题
使用http://localhost:8080/xx/xx.jsp和http://计算机名:8080/xx/xx.jsp和花生壳域名效果如下图

排版出现问题


javascript检测是否输入及输入长度等代码没有执行
使用http://外(或内网)IP地址:8080/xx/xx.jsp和http://127.0.0.1:8080/xx/xx.jsp访问则正常显示,如下图

排版正常


javascript代码正常执行
哪位知道是什么原因?使用的是MyEclipse7.0及自带tomcat服务器。
------解决方案--------------------
计算机名 应该是HOSTS中的名字
如果你没有配置过,直接用 计算机名 是没有用的。
------解决方案--------------------楼主确定用了相同的浏览器吗,好多js 浏览器是不兼容的,另外http://127.0.0.1:8080/xx/xx.jsp和
http://localhost:8080/xx/xx.jsp 不一样的吗,怎么会不一样呢
------解决方案--------------------说明 CSS 和 JS 的地址是依赖于 IP 的
------解决方案--------------------样式文件有不 F12 看看,是不是发布后文件没了。