/* below IE instead of Internet Explorer to Mf/ff instead of Mozzila Firefox * *
Window.event
IE: There are window.event objects
FF: No Window.event object. You can pass an event object to a parameter of a function. such as Onmousemove=domousemove (event)
Workaround: var event = Event | | window.event;
Example
Copy Code code as follows:
Mouse Current coordinates
Ie:event.x and Eve
The incompatibility of browsers must be terrible. We often just fix it, but forget the more important thing, that is, tracing the root cause to avoid the occurrence of similar incompatibility. I will summarize the following HTML encoding elements:
1.TextThe size is not compatible. It is also the font-size: 14px text. The space occupied by different browsers is different. The actual space occupied by IE is 16 PX, and the space reserved by IE is 3px. The actual height occupied by
The following are the default values of screen Calculation for new ie pages:Ff and IE both support (computing differences) visible area width of the webpage [document. Body. clientwidth]: 1239Ff and IE both support (computing differences) the visible area of the webpage is high [document. Body. clientheight]: 0Ff and IE both support (computing differences) visible area width of the webpage [document. Body. offsetwidth]: 1239Ff and IE both support (computing differences) the visible area of the w
css| Solution | Problem
Resolve IE5/IE5.5/IE6/FF compatibility issues--CSS
Previously found several different versions of the Internet Explorer can run independently, just to try to test the compatibility of the page. Don't try not to know, in IE6 and FF no problem page in IE5 and IE5.5 mess, has been heard that IE5 is a Web standard production of a "nail", now have to believe.
Since there are problems, th
Css
Resolve IE5/IE5.5/IE6/FF compatibility issues--CSS
Previously found several different versions of the Internet Explorer can run independently, just to try to test the compatibility of the page. Don't try not to know, in IE6 and FF no problem page in IE5 and IE5.5 mess, has been heard that IE5 is a Web standard production of a "nail", now have to believe.
Since there are problems, then find a solution to
CSS single row overflow text display ellipsis... method (compatible with IE ff) (convert)
Html
Code :
CSS code:Div {Width: 200px;/* basic definition of the container */Height: 200px;Background-color: # Eee;}
/* Style under ie */P span {Display: block;Width: 200px;/* defines the width. Modify the width as needed */Overflow: hidden;White-space: nowrap;Text-overflow: ellipsis;}
/* Style under FF */P
HACK principle: different browsers recognize different characters
Special Character Recognition tables are commonly used in CSS:(1 )*:IE6 + IE7Yes, but the standard browser FF + IE8 cannot recognize;(2 )! Important:Except IE6, it cannot be recognized! Outside important,FF + IE8 + IE7Yes! Important;(3) _: DivisionIE6Supported _ external, FF + IE8 + IE7 a
I am working on a project recently and have no time to write a blog.
I seldom reprinted it, but this article is awesome! So I can't help but reprint it for the first time!
Convert from blue to ideal
Author: bias
Solve ie5/ie5.5/IE6/FF compatibility problem-CSS
I have found several independent ie browsers of different versions, just to try the page compatibility problem. I don't know if I don't try it. The pages that are okay in IE6 and
following declaration must be made on the top of HTML:Code:2. Universal float closure (very important !) You can use this to solve the incorrect spacing when multiple Div alignment occurs,For details about the principle of clear float, refer to [How to clear floats without structural markup]Add the following code to global CSS and add class = "Clearfix" to the DIV to be closed.Code:3. Other compatibility skills (useful)1. Setting padding for Div under FF
P {+ color: # f00;} supports IE6 IE7 and does not support FF IE8P {_ color: # f00;} supports IE6 and does not support FF.P {color: # 00f! Important ;}P {color: # f00;} supports IE7 IE6 FF IE8P {color: # 00f! Important; color: # f00;} supports IE7 IE8 FF and does not support IE6Head: first-child + body p {color: # f00;} supports IE7 IE8
FF Firebug, not only can test JS can also check CSS errors, is generally used.But it is mainly to check the FF error, IE is powerless.To test IE, use ietester, it can test almost all versions of IE (1.0 I'm afraid it won't be tested), usage is also very convenient.As for JS to different browser compatibility considerations, indeed a lot, the following is only part of you, general advice or use jquery,protot
css| Solve | The problem
Previously found several different versions of the Internet Explorer can run independently, just to try to test the compatibility of the page. Don't try not to know, in IE6 and FF no problem page in IE5 and IE5.5 mess, has been heard that IE5 is a Web standard production of a "nail", now have to believe.
Since there are problems, then find a solution to it, a search on the Internet, the relevant articles or a lot of, think the
(Experience) Div + CSS solves IE6, IE7, IE8, and FF compatibility problemsLet me talk about it. After nearly a year of Div + CSS, we have accumulated many methods to solve compatibility problems. Here I only talk about the mainstream ones (IE6, IE7, IE8, ff) others have not been studied.1. For compatibility issues in IE8, it is best to solve this problem by converting it to IE7 compatibility.Add the followi
Turn from Blue Ideal
Author bias
Original Address http://www.blueidea.com/tech/site/2006/3296.asp
Previously found several different versions of the Internet Explorer can run independently, just to try to test the compatibility of the page. Don't try not to know, in IE6 and FF no problem page in IE5 and IE5.5 mess, has been heard that IE5 is a Web standard production of a "nail", now have to believe.
Since there are problems, then find a solution to
Differences between JS and CSS in IE and Firefox (FF)
CSS:
1.
In the UL tag, FF has a padding value, but there is no margin value. In ie, the opposite is true.
Solution: Set UL's padding and margin to 0 (or not 0), for example, padding: 0; margin: 0; List-style: none;
JS:
1.
In IE, innertext is not in ff, and textcontent is used;
Eg:
CopyCode The Code is
Differences between js and css in IE and FireFox (FF)Css: 1.In the ul tag, FF has a padding value, but there is no margin value. In IE, the opposite is true.Solution: Set ul's padding and margin to 0 (or not 0), for example, padding: 0; margin: 0; list-style: none;Js: 1.In IE, innerText is not in FF, and textContent is used;Eg:Copy codeThe Code is as follows:Var
1. If an html Tag is set to $ (id) or getElementById, you must add the id attribute to the tag. IE and FF are compatible. For example, $ (mobile): If the input of mobile does not have the id attribute, the variable undefined will be reported in FF;2. Take a tag object in the form. If you want IE and FF compatibility, change formMain. item to document. formName. i
1. Custom attribute problems: You can get custom properties by using methods that get general properties, or you can use Getatribute () to derive a custom attribute, and only use getattribute () to derive a custom attribute under FF.2. In IE, you can use eval ("Idname") or getElementById ("Idname") to obtain an HTML object with ID idname, which can only be used with the latter, the solution, and unified getElementById acquisition.The ID of the HTML ob
corresponding to the function in FFLike what:function (e) { getObject (this, e| | event); // box captures the event and processes e-->ff window.event-->ie };Of course there are times when you can think of this: Use Global object Arguments[0] to replace captured event arguments// dis = arguments[0]| | window.event; If the above sentence cannot get the event under FF, I hear that the
I. Problems:
Var xmlHttp;Function savecarttodata (){ CreateXMLHttpRequest ();Var rndcode = new Date (). getTime ();Var CartUrl = "a. asp? Cache = "+ rndcodeXmlHttp. onreadystatechange = function (){.....
}XmlHttp. open ("GET", CartUrl,True);XmlHttp. send (null );}
The code above, xmlHttp. onreadystatechange = function () {...}; can be executed in FF, but if it is changed
XmlHttp. open ("GET", Url,False); It will not work at the moment. Today, I am con
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.