This article mainly describes the differences between the two document modes, Quirks mode and Standards mode, and gives some detailed examples to illustrate the differences. By reading this article, Web development engineers can have a deeper understanding of how browsers work, and avoid developing Web applications that have different effects on different browsers.Quirks Mode Overview DefinitionWhat is Quirks
What is the Quirks mode ?, Quirks Mode
What is DOCTYPE:
DOCTYPE, or Document Type Declaration (DTD ). Usually, DOCTYPE is located at the beginning of an HTML document
Location, before the starting tag of the root element HTML. In this way, you can determine the type of the current document before the browser parses the HTML document body to determine
Rendering mode (different rendering modes will affect the
Quirks Mode Overview
Defined
What is Quirks Mode? In short, Quirks mode is a page-rendering mode that browsers have designed to be compatible with older browsers and not strictly comply with the standard Web pages.
History
Two document modes generated by the rendering engine
When it comes to Quirks modes, it start
Note: original author from javaeye: kino
View JSCodeSometimes you will see things about the quirks mode (weird mode) and strict mode (strict format), and I have never been very careful about what's going on, but it's just a bit fragmented, I can't take this kind of feeling recently. I decided to take a look at it.
1. quirks mode and strict mode are two modes for the browser to parse CSS, or they can be
It's interesting to learn about some of the programming quirks of JavaScript, and it's worth summarizing:1. Unknown variable name Create global variable in our usual programming of JavaScript, some people are not very formal, when defining variables, the direct definition of "variable name = value" is not preceded by "Var", JavaScript automatically defines it as a global variable view But in ECMAScript5 's rigorous mode get a warning:For example: f
In the HTML declaration DOCTYPE general will have the following several:Yes, there are HTML and XHTML, as well as transitional and strict. As the name implies, XHTML means that the document is written in XML format, while HTML means that the document is written in HTML format. Transition said the document met the requirements of TRANSITIONAL.DTD or LOOSE.DTD, and strict said the document met STRICT.DTD requirements. But in fact we often have the following misconceptions: (1) My Documents are dec
Because of the differences between various browsers on the market and the "quirks" of different browsers, we may need client-side detection during development to ensure that our code runs smoothly across all browsersThe first of the most commonly used client-side detection- capability detection . The goal of competency detection is not to identify specific browsers, but to identify the capabilities of the browserif (object.propertyinquestion) { //
Due to historical reasons, each browser has different rendering on the page, and even the same browser in different versions, the page rendering is not the same. Before the introduction of the world standard, the browser has no uniform specification on the rendering of the page, resulting in a difference (Quirks mode or compatibility mode); Due to the introduction of the world standard, browser rendering page has a unified standard ( Csscompat or Stri
The jsp page is automatically set to "Miscellaneous (Quirks)" In IE8 text mode, which leads to page display dislocation. Recently, when modifying the responsive page of the website, it is a set of style pages, the modification process is pasted and copied, causing some details to be exposed in IE8:
The problem is that the Chrome and Firefox pages are normal, but the page style is messy under IE8, but the local display is normal, and the Tomcat cach
width and height of the standard CSS box model is equal to the height and width of the content area, does not contain padding and borders, and the width and height of the box model implemented by IE6 before the browser contains padding and borders. Therefore, for IE, strange mode and Standard mode box model width and Height calculation method is not the same;
vertical alignment of inline elements: Many early browsers align pictures to the lower border of the box containing them, although th
When you are working on an. aspx page, when you test the page with the Ie9 browser, you find that the document mode automatically switches to "Miscellaneous (Quirks)", causing the page to deform badly. After Baidu did not have the fruit, I spent nearly 2 hours of time,
Stepping through the error code, and finally surprised to find that the cause of the error is not in the foreground code, but in the. aspx.cs file in the background. In the background f
How can I solve the problem of abnormal win10 boot typing ?, Win10 boot typing Solution
After upgrading win10, xiaobian found that the typing reaction was very slow for a period of time after the startup. The following describes the solution for your reference,
Click the window key in the lower right corner, as shown in
Select Settings to enter, as show
Swing simple typing game source code, swing typing game
The Code is as follows:
Import java. awt. *; import java. awt. event. *; public class Main {public static Frame f = new Frame (); public static void main (String [] agrs) {f. setSize (500,400); f. setLocation (Toolkit. getdefatooltoolkit (). getScreenSize (). width-f.getSize (). width)/2, (Toolkit. getdefatooltoolkit (). getScreenSize (). height-f.getS
Zero: abstract [this post is the first in the 12 quirks series of javascript.] JavaScript is very tolerant. "Don't refuse", don't care what type. For example, if it wants to accept numbers, it does not reject values of other types, but tries to convert them to... SyntaxHighlighter. all ();
Zero: Abstract[This post is the first in the 12 quirks series of javascript.]
JavaScript is very tolerant. "Don't refus
This article reproduced, recorded the problems encountered, for the time being not carefully studied. The role of IE=EMULATEIE7 tagsFor WEB developers, text compatibility is an important issue to consider. Windows Internet Explorer 8 introduces text compatibility mode, which allows Web developers to set the browser to display Web pages in the same way as older versions, allowing developers to choose the time to update. This document describes the text compatibility mode that is supported by Wind
IE7/8 when the text mode is miscellaneous "Quirks", leading to JSP page variations, ie7quirks
Possible causes:
1. jsp page header Encoding Problems. For example:
Solution to this problem:
1. jsp page header encoding problem, solution:
Set
Change
Why?
I am not very clear, just know it, but I don't know why, just do this record ...... Thank you!
After finding the information, IBM should be reliable:
JSP page instructions for setting industry-level
JavaScript Pseudo-protocol and inline events are different for this point - ahref="#"onclick= "alert (this.tagname);">Click Mea>Eject a - ahref= "Javascript:alert (this.tagname);">Click Mea>Eject undefined - ahref= "Javascript:alert (This==window);">Click Mea>Popup True - inputID= "BTN"type= "button"value= "This demo"name= "button"/>Some of the quirks of this in JavaScript
executes, so somevar as True
The result is a screenshot of the following, which pops up two boxes in a row:
Translator Note: The reason for this difference, according to the author, the array built-in ToString () method, such as direct alert, will be in the form of join (",") pop-up string, empty array nature is an empty string, so the equivalent of false. Refer to the author's other article, "Twisted logic:understanding truthy Falsy". But my personal surprise is that empty objects,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.