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
default behavior onlyvar preventdefault = function (e) { e = e | | window.event; if (e.preventdefault) { e.preventdefault (); } else{ e.returnvalue = false; }}Get Event Source Objectvar geteventtarget = function (e) { e = e | | window.event; var target = event.srcelement? Event.srcElement:event.target; return target;}Attached: Binding Onpropertychange event Onpropertychange, which is triggered when an element's attribute changes, is typically used to capture its valu
Copy Code code as follows:
A drag effect, according to some of the forum posts changed, but there are some bugs have been unable to solve, who can help me change?
When you drag a layer for the first time, the position of the layer deviates very far.
uh ..... This involves a style problem ...In IE and Firefox, Obj.style is actually just getting the value of the attribute style in the element!
In the following example, you will find that none of the attributes in the style block ca
Object name. AddEventListener ("event name (without on)", function name, true/false);(ff)
Object name. attachevent ("event name", function name);(IE)
Description
Event name, note that "onclick" to Change to "click", "onblur" to "blur", that is, the event name does not take "on".
Function name, remember not to have the last argument with parentheses is a Boolean value that represents the order of response for the event, and the following is an emphasis
More articles can refer to the http://www.jb51.net/tag/event/1.htm
In addition, using srcelement in IE to get event trigger source, use target under FF. Therefore, the use of these two objects requires related browser compatibility.
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
View Run Results
Combined with attachevent and AddEventListener in the last section.
Copy Code code as follo
There may be a slight difference in the conditions triggered by different browsers, and today we say that the focus and blur events of the IFRAME in the Firefox browser will trigger an invalid problem.
Solution:
1: Use Contentwindow, directly using jquery blur and focus, if you use native, add a browser to judge then Attachevent and AddEventListener on the line
The code is as follows
Copy Code
$ ($ (' #frame ') [0].contentwindow). blur (function () {})$ ($ (' #fram
The preliminary judgment is that the Obj.style.backgroundColor returns in FF is the reason of RGB (xxx,xxx,xxx). I am a novice, the code is very vegetable, master don't laugh Ah
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
This article mainly introduces the differences between js in IE and FF. For more information, see firefox firebug plug-in.
Ability to set breakpoint execution for js
Ability to modify css styles during runtime
View dom Models
☆The internal bar of IE8 is also very good.
☆Open all js warnings in firefox:Enter: about: config in the address barDouble-click and set javascriptoptionrestict to true. Many warnings are displayed, which is conducive to error c
1. DivCenter problem When div sets margin-left and margin-right to auto, it is already centered,IE doesn't work. IE needs to set the body to center,First, define text-algin: center in the parent element;This means that the content in the parent element is centered.2.Link(Tag)Border and background Add the border and background color to the link. Set display: block and float: left to avoid line breaks.Refer to menubar to set the height of a and menubar to avoid misplacement of the bottom side,If n
Firefox firebug plug-in is recommended for js debugging tools.
Ability to set breakpoint execution for js
Ability to modify css styles during runtime
View dom Models
☆The internal bar of IE8 is also very good.
☆Open all js warnings in firefox:Enter: about: config in the address barDouble-click and set javascriptoptionrestict to true. Many warnings are displayed, which is conducive to error correction.
☆Ie-> firefoxjavascript class
△Document. all ("id")-> document. getElementById ("id ")And the c
In JavaScript For browser compatibility-solutions to browser compatibility issues have been tested in IE, FF, Chrome, in IE, FF, and Chrome tests, the CSS compatibility and JS compatibility in the browser have been briefly described, now, we will continue to briefly describe the compatibility of CSS in the browser.
1) the list cannot wrap.
Problem:
Li is set to floating, followed by li, cannot wrap
Solutio
In the previous article, I learned the npruntime example program. I can't wait to implement my own plug-in. I decided to use VS 2005.
A new project named npgnet is created. According to the npruntime example, np_entry.cpp, npn_gate.cpp,The npp_gate.cpp and npgnet. Def files create a cgnetffplugin class and add the key code in the example.
Some Function entity codes in the cplugin class, because the functions I implemented are irrelevant to the ones in the example ). After compilation, put the ge
Solve the simplest CSS hack compatible with IE6, IE7, and Firefox
# Somenode{Position: fixed;# Position: fixed;_ Position: fixed;}
The first line is for Firefox and other browsers.
The second row is for IE7 (maybe the same is true for IE8 and ie9 in the future. Who knows ?)
The third row is for IE6 and older versions. CSS has a high value for the compatibility of browsers. In general, there is a great difference between IE and Firefox. Here we will introduce the compatibility points.FAQs:
CSS compatibility has always been a headache for everyone. Now let's talk about how to differentiate these browsers. IE6, IE7, IE8, and FF all refer to the official IE8 version. Version: 8.0.6001.18702.
Taking color as an example, how to distinguish these browsers:
. Csshack {Color: # f00;/* display the CSS-supported browsers in red */Color: # 00f \ 9;/* IE8 can be identified to overwrite the preceding rule in blue */* Color: #0f0! Important;/* IE
Turn from Blue Ideal
Author bias
Original Address http://www.blueidea.com/tech/site/2006/3296.asp
Before looking for a few different versions of the self-running Internet Explorer, just to try to test the compatibility of the page. Don't try not to know, in the IE6 and FF no problem page in IE5 and IE5.5 mess, always heard that IE5 is a Web standard production of a "nail house", now have to believe.
Since there is a problem, then find a solution to t
First: What's the browser compatibilityBrowser compatibility issues are also referred to as Web compatibility or web compatibility issues, meaning that Web pages may appear inconsistent across browsers, resulting in compatibility issues between browsers and Web pages. In the design and production of the website, do a good job of browser compatibility, to allow the site under different browsers are normal display. For the development and design of the browser software, the better compatibility of
+ + serror.line;
document.write (TXT);
}else{
document.write (Sresult);
}
else if (document.implementation.createDocument) {
var oserializer = new XMLSerializer ();
var sxmldom = oserializer.serializetostring (Myxmldom, "text/xml");
var oparser = new Domparser ();
var oxmldom = oparser.parsefromstring (Sxmldom, "text/xml");
if (OXmlDom.documentElement.tagName = = "ParserError") {
var oxmlserializer = new XMLSerializer ();
var sxmlerror = oxmlserializer.serializetostring (oxmldom);
FAQs about compatibility with IE6 IE7 FF in Div + CSS layout
General use of all browsers (IE6 IE7 FF mainly used in the market)
Height: 100px; dedicated for IE6
_ Height: 100px; dedicated for IE6
* Height: 100px; dedicated for IE7
* + Height: 100px; shared by IE7 and FF
Height: 100px! Important;
I. CSS compatibility
The following two methods can solve almost all
InWebsite DesignPay attentionCSS style compatibilityDifferent browser problems, especially those designed for completely using Div CSS, should pay more attention to IE6 IE7 FF's compatibility with CSS styles. Otherwise, your network may be out of chaos and do not want to have any effect!General height of all browsers: 100px;IE6 dedicated _ Height: 100px;IE6 dedicated * Height: 100px;IE7 dedicated * + Height: 100px;IE7 and FF share Height: 100px! Impor
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.