quirks-mode

Document.getElementById() returns element with name equal to id specified

放肆的年华 提交于 2019-12-01 05:23:44
I have previously mentioned in this SO about the funny behavior for IE6/7 (and some versions of Opera) in that document.getElementById can find an element whose name attribute is defined but not the id attribute, such that function f() { document.getElementById("a1").value = ...; } ... <input name="a1" ...></input> actually works in these versions. Searching through the net I found this bug report by Chris Bloom, in which a user named Milo van der Leij points out the following (as referred by him in this w3c spec ): In their defense: "The id and name attributes share the same name space." What

Document.getElementById() returns element with name equal to id specified

非 Y 不嫁゛ 提交于 2019-12-01 04:06:57
问题 I have previously mentioned in this SO about the funny behavior for IE6/7 (and some versions of Opera) in that document.getElementById can find an element whose name attribute is defined but not the id attribute, such that function f() { document.getElementById("a1").value = ...; } ... <input name="a1" ...></input> actually works in these versions. Searching through the net I found this bug report by Chris Bloom, in which a user named Milo van der Leij points out the following (as referred by

why am I triggering quirks mode in IE8?

风流意气都作罢 提交于 2019-12-01 03:29:56
I'm working on a page that, when I load into IE8 and view the developers tools it tells me that page default is quirks mode. I've got a strict DTD: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> I even went ahead and put in the explicit standards switch, though I didn't think I'd need to: <meta http-equiv="X-UA-Compatible" content="IE=8" /> I can't understand why page default isn't IE8 standards? Only thing I can think of is that to get to this page, I first have to log in to an application and the first pages I must traverse are old quirks mode

Run quirks mode in one frame and standards mode in another?

瘦欲@ 提交于 2019-12-01 02:48:46
I have an old application that uses frames (not iframes) was was written back in the IE6 days so it runs in quirks mode. Is it possible (Using IE 7 or 8) to have one frame still in quirks mode and another in standards mode or must the whole browser be in one mode or another? I've been trying with no success. I've seen this answer , that applies to iframes, but what about plain-old-frames? I believe that you don't get the same option with frames as you do with an iframe. As the linked question's answer stated, the target in an iframe is not dependent upon the parent. In regular frames the pages

Forcing IE7 into standards rendering mode (not quirks)

偶尔善良 提交于 2019-12-01 00:54:33
问题 I'm having display issues in IE7 due to it rendering in quirks mode. I've confirmed this by displaying "document.compatMode" and getting back "BackCompat" as opposed to "CSS1Compat". Using IE8 and reverting to IE7 works, because that keeps it out of quirks. In plain IE8 I have it fixed by forcing the rendering mode with the X-UA-Compatible header, but this does not work for IE7. The other browsers also display in quirks, but unlike IE this does not put them into pseudo-IE5.5 mode, so they

HTML/DOM: What is standards equivalent of document.body.scrollHeight?

我怕爱的太早我们不能终老 提交于 2019-11-30 20:58:43
For nearly a decade i've been using: document.body.scrollHeight to return the " ideal " height of the browser window. This worked fine when i was forcing Internet Explorer into quirks mode , by using a quirks-mode doctype: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> Now i want to opt into standards mode , except the meaning of scrollHeight has changed : Quirks Mode : document.body.scrollHeight = the height of the document Standards Mode : document.body.scrollHeight = the height of the <body> element What is the standards mode equivalent of document.body.scrollHeight ? See

How do I get IE9 to use standards compliant mode when developing on localhost?

会有一股神秘感。 提交于 2019-11-30 17:27:45
According to MSDN, all I need to force standards compliant mode is to include the HTML 5 doctype: http://msdn.microsoft.com/en-us/library/gg699338%28v=vs.85%29.aspx And it works when the markup is served remotely. The problem is when I take identical markup and serve it up from an apache server running locally. IE9 defaults to quirks mode, and the compatibility view button goes away. I do a lot of development locally, and it defeats the purpose if I can only test my code in IE when it's served remotely. Thanks in advance. Try adding this: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http

IE 10's -ms-clear pseudo-element, and IE5 quirks mode

假装没事ソ 提交于 2019-11-30 09:59:22
I'm working on a legacy web app that requires use of Internet Explorer's 'IE5 Quirks Mode' (set using X-UA-Compatible: IE=5 ). A number of text fields in the app have (app-generated) 'x' buttons to clear the content. In IE10, IE also generates an 'x' button to clear the field, so the user sees two of them. As discussed in this question , you can remove the IE-generated 'x' using the ::-ms-clear CSS pseudo-element. Unfortunately, this appears not to work in IE5 Quirks Mode: styling of the ::-ms-clear pseudo-element shows up in the developer tools as :unknown , and the IE-generated 'x' continues

What throws Internet Explorer into quirks mode?

自作多情 提交于 2019-11-30 08:55:34
问题 I have created a webpage ( http://www.snow4life.yum.pl ) that was rendered properly in firefox, chrome etc. Of course dumb IE complicated things, because it enters quirk mode automatically, even though doctype is properly set and site goes through w3 validation (there is one error of missing some char, but file was cleared in hex editor). How can I stop ie from entering quirks mode ? Is there any way ? 回答1: Try killing all the whitespace before the DOCTYPE. EDIT: There is an <feff> character

HTML/DOM: What is standards equivalent of document.body.scrollHeight?

99封情书 提交于 2019-11-30 05:21:40
问题 For nearly a decade i've been using: document.body.scrollHeight to return the " ideal " height of the browser window. This worked fine when i was forcing Internet Explorer into quirks mode , by using a quirks-mode doctype: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> Now i want to opt into standards mode , except the meaning of scrollHeight has changed: Quirks Mode : document.body.scrollHeight = the height of the document Standards Mode : document.body.scrollHeight = the