Today, when I was in a report with 52 Fields, I was forced to do some in-depth research,
I found:
The default value of Col display in FF is: Table-column.
The default value of visibility is visible.
I checked the CSS manual and found that visibility has an optional collapse value. It is said that visibility is not implemented in IE, and IE is not implemented in FF instead, just like
behind. The following describes how to write more details.How to Write CSS hackFor example, to distinguish IE6 from Firefox, you can write as follows: Explanations:In Firefox, the above CSS does not recognize the stuff with an asterisk *, so it is filtered out and ignored. The parsed result is: div {Background: Green}, so the background of this div is green.In IE6, both background can be identified. The parsed result is: div {Background: green; Background: red;}, so according to the priority le
In ie, event objects are saved and maintained as global variables. All browser events, whether triggered by the user or other events, will update the window. event object. Therefore, in the code, you only need to easily call window. event, you can easily obtain the event object, and then event. srcElement can be used to obtain the element that triggers the event for further processing in ff, but the event object is not a global object. Generally, it o
I should be tired after the night package, but I still have the strength to beat these characters. It seems that I have not reached this point yet.
To put it bluntly, I recently wrote an online editor, which is similar to ewebeditor. Of course, it is not as powerful as other people, but has basic skills and is compatible with ie and ff, I have also spent a lot of effort on this, so let's sacrifice the code.
Demo.html:
Copy codeThe Code is as follows:
How to say, just wrap up the night bar, should be very tired, but still have the strength to beat these characters, it seems I have not so far.
Less nonsense, recently wrote an online editor, similar to Ewebeditor, of course, no one is so powerful, but the basic functions are, but also compatible with IE and FF, so I also spent a lot of kung fu, or hurriedly put the code to come out
demo.html:
Copy Code code as follows:
Font: Font si
:
Copy Code code as follows:
var myObject = document.getElementById ("header");
var myattribute = Myobject.getattribute ("class");
Also, when you set the class attribute using setattribute (), the same differences exist between the two browsers.
Copy Code code as follows:
SetAttribute ("ClassName", value);
This applies to all IE versions prior to IE8.0, noting that IE8.0 also does not support the "ClassName" attribute.
SetAttribute ("Class",
If you want to JS access to the functions in flash, you need to register a callback function with Addcallback, let JS to call (AS2 example)
The code is as follows
Copy Code
Import flash.external.*;var methodname:string = "Setimgpath";//js the name of the function that needs to be calledvar instance:object = null;var method:function = The actual function name in Extractstr;//flash, parameter ignored, but when you call, remember that there are parameters to addvar Wass
Because IE10-IE11 version problem, no longer support document.all judgment, so IE judgment function to be written again
function Isie () {//ie?
if (!! Window. ActiveXObject | | ' ActiveXObject ' in Window ' return
true;
else return
false;
First, browser only, regardless of version
Copy Code code as follows:
function Mybrowser () {
var useragent = navigator.useragent; Gets the useragent string for the browser
var Isopera = Useragent.ind
Obtain the div editing box, textarea, and inputtext. The cursor position is compatible with the IE, FF, and Chrome methods. If you have any need, you can refer to the online solution for 2 hours, but it is not compatible with FF, it seems that this kind of thing is not ready for use on the Internet.
Now released, there will be ready-made online for people to use.
In order to save trouble, it is also very c
For the optimal method of clearing floating in IE7, FF, and OP, we discuss a margin problem in the CSS Forest Group and inadvertently find that overflow can also be used to clear floating. Hey hey, this method is not just easy to use, in addition, FF, OP, and IE7 are supported. From then on, we can say goodbye to the FF Floating Method with long compatibility.
T
When you use $ (# id ). the ie and ff are different when attr (color) gets the color. The following is an example. For more information, see $ ("# id "). when attr ("color") gets the color, ie and ff are different. A simple example:
The Code is as follows:
Use $ ("# id "). attr ("color") gets "green" in ff and chrome, and "#008000" in ie ".
Therefore,
When php reads data from the database, ie8 can obtain the data. browsers such as chrome, 360, and ff cannot obtain the data. This post was last edited by vic90 at 16:55:13 on.
Browser php mysqlThis is my php code. I want to get the content of the z_register data table, which can be obtained through IE browser, but cannot be obtained through chrome, 360, FF, or other browsers.
When chrome, 360,
In the recent MD page, we need to consider ff and IE, so a lot of JS will have some problems.It is best to use W3C standard L for coding.
You can also:
This is an event executed after the IE and FF pages are loaded.
Innertext does not have this attribute in ff. The corresponding attribute is textcontent.The following is to determine whether it is IE
If (naviga
The best way isWord-wrap: break-word; overflow: hidden;InsteadWord-wrap: break-word; word-break: break-all;NeitherWord-wrap: break-word; overflow: auto;
There is no problem in IE. In FF, long strings of English will be overwritten.
Differences between word-wrap and word-break
Word-wrap:Normal Default. Content exceeds the boundaries of its container.Break-word Content wraps to next line, and a word-break occurs when necessary. If necessary, the word-br
In IE, there are onmouseenter and onmouseleave.
Unfortunately, FF does not. I want to explain again, why does FF not reference such a good function?
There is also onpropertychange in IE, ah, FF, none...
A js section is introduced in the comparison example to be compatible with FF's onmouseenter and onmouseleave .:CopyCodeThe Code is as follows: var XB ={Evtha
)http://www.CodeHighlighter.com/-->Function Format (what, OPT){Editor. Focus ();Editor.document.exe ccommand (what, false, OPT );}
Recognize selected text and manipulate dom
There are several differences between FF and IE. One is press enter, and the other is
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Editor.doc ument. onkeypress = fnkeypress;
Function fnkeypress (){
If (document. All ){
VaR EV =
How does FF change to full screen? (Not the F11 style)-Linux general technology-Linux technology and application information. The following is a detailed description. I don't know what the key is or what it is, FF suddenly becomes full screen, but unlike pressing F11 full screen (I press F11 here and the window is full screen and only the tab bar is retained ), it only hides the outer border of the window (
Because FF's default font is, and the default browser settings ignore the font definition in CSS. Therefore, if you do not specify the font of the FF in CSS, the styles of the two browsers will definitely be different [the premise is that you have not changed the default settings of the FF browser, so that it can be defined with the CSS font].
Other summary:
1. P labels in IE and
Event is an object that comes with ie, but ff does not have this object. You can only simulate the event by passing parameters. The following briefly introduces that event is an object that comes with ie, this object does not exist in ff. You can only simulate the event by passing parameters.
In addition, srcElement is used in ie to obtain the event trigger source, and target is used in
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)
Mouse Current coordinates
Ie:event.x and Event.y.
FF:event.pageX and Event.pagey.
General: Both have Event.clientx and Event.clienty attributes.
The current coordinates of the mouse (plus the distance the scroll bar rolls over)
IE:event.offsetX and Event.offsety.
FF:event.layerX
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.