[英]Obscure Javascript difference between IE / Firefox / Opera
Within a "cloaked" site, using obj.innerHTML = something
to change the contents of a div seems to screw up the div's position in Firefox and Opera. 在一个“隐蔽”站点中,使用obj.innerHTML = something
更改div内容的obj.innerHTML = something
似乎使div在Firefox和Opera中的位置obj.innerHTML = something
。
Best way to understand the problem is by seeing the code in action. 理解问题的最佳方法是查看实际的代码。 Go to http://www.guggs.net/index_redirected.htm in IE, Firefox or Opera and everything looks as it should. 在IE,Firefox或Opera中访问http://www.guggs.net/index_redirected.htm ,一切看起来都应该正确。
Hit one of the links in IE and everything is still fine, but in Firefox the page gets misaligned and there's no way of getting it back into shape. 点击IE中的链接之一,一切仍然很好,但是在Firefox中,页面未对齐,无法使其恢复正常。
Hit one of the links in Opera and the misalignment happens but if you then hit another link the page is OK again and remains so however many links you hit. 在Opera中点击其中一个链接会发生未对齐的情况,但是如果您再点击另一个链接,则该页面将再次正常运行,因此无论您点击了多少链接,该页面仍然有效。
If however you go straight to http://www.sensetech.me.uk/guggs which is the page behind the "cloak" it's all fine whichever browser you use and however many links you hit. 但是,如果您直接转到http://www.sensetech.me.uk/guggs (位于“斗篷”后面的页面),则无论使用哪种浏览器,无论点击多少链接,都可以。
Help ! 救命 !
Warning: Expected end of value but found ','. 警告:期望值的结尾,但找到“,”。 Error in parsing value for 'padding'. 解析“ padding”的值时出错。 Declaration dropped. 声明被放弃。 Source File: /guggs/css.css Line: 39 源文件:/guggs/css.css行:39
td {
font: 9pt verdana;
color:#665544;
padding: 0px, 0px, 0px, 5px;
}
Issue resolved. 问题解决了。
Nothing do with the Javascript ! 与Java无关! FireFox and Opera were tripping due to earlier PHP code intended to prevent users coming in through anything other than the index page. 由于早期的PHP代码旨在防止用户通过索引页面以外的其他内容进入,因此FireFox和Opera跳闸了。 Works OK when the site isn't cloaked so I'm not sure exactly what the problem is, but for the moment I've removed the code, which isn't anything like vital. 当站点未隐藏时可以正常工作,因此我不确定到底是什么问题,但是目前我已删除了代码,这并不是很重要。
Thanks for your time, people ! 谢谢您的宝贵时间!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.