当页面使用'localhost'vs机器名称时,网页中的奇怪行为 [英] Odd behaviour in web page when page uses 'localhost' vs machine's name

查看:130
本文介绍了当页面使用'localhost'vs机器名称时,网页中的奇怪行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网页,我正在开发,我可以在页面上拖动div。它工作正常在所有的浏览器,除IE6& IE7其中,当我拖动div,div显示在下面的div上,而不是在它的顶部。这不是手头本身的问题。我知道IE6& IE7有z-index设置的问题。这是一个复杂的页面,不同的div具有不同的z-index值。

I have a web page which I am developing where I can drag divs on the page. It works fine in all the browsers except IE6 & IE7 where when I drag a div the div shows beneath the dropped on div instead of on top of it. This is not the problem at hand per se. I know IE6 & IE7 have issues with z-index settings. This is a complicated page with different divs have different z-index values.

页面在IE8中正常工作 IF 'localhost'。如果我切换url使用我的机器的名称,该页面显示div显示在其他div下面的行为,如前所述。我不知道为什么这是发生当它是同一台机器,同一页来自同一个文件。唯一的变量是域名地址的url。我支持IE8作为公司的标准。

The page works fine in IE8 IF the url on my machine uses 'localhost'. If I switch the url to use my machine's name, the page exhibits the behavior where the div shows beneath the other div as explained earlier. I don't know why this is happening when it's the same machine, the same page coming from the same file. The only variable is the url for domain name place. I am supporting IE8 only as its the standard at the company.

如果我使用机器ip地址页面工作。总之,如果我使用localhost或ip地址,它工作正常。如果我使用我的机器的名称它的行为。

If I use the machine ip address the page works. In short, if I use localhost or ip address it works fine. If I use my machine's name it misbehaves.

我清除IE8的缓存,并重新启动机器。
该页面只存在于我的机器上,因为我创建它,所以没有机会来自其他地方。

I cleared IE8's cache and rebooted the machine. The page exists only on my machine because I am creating it so there's no chance it's coming from anywhere else.

我不能想到为什么这是发生。

I can't think of why this is happening. IE8 is behaving differently for the same page when the server name is different in the url.

任何提示?

推荐答案

由于某种原因,IE很可能在标准和怪异模式之间切换,因此您的运行时环境不完全相同。可悲的是,但这就是盖茨先生想要滚动的面团,同时笑我们其余的人。

Most likely IE is switching between standards and quirks mode for some reason, so your runtime environments aren't exactly the same. Sad, but that's how Mr. Gates wants to roll - roll in his dough while laughing at the rest of us.

这篇关于当页面使用'localhost'vs机器名称时,网页中的奇怪行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆