Simple shopping cart code (a little ajax is used) why is the image displayed normally under ff but not under ie? is it because of ajax code? JScriptcodevarxmlhttp; functioncreateXHR () {try {xmlhttpnewActiveXObject ( quot; Msxm12. simple shopping cart code (a little ajax is used) why does the image display normally under ff but cannot be displayed in ie?
Ie cannot be shown below
Is it a problem with ajax
In IE, we can directly use window. event. keycode to obtain the keyboard code, but this statement is not supported in ff. The followingCodeSo that we can be compatible with them.
InputType= "Text"Value= ""Onkeypress= "Testcode (event )"/>
Because the window object in FF does not have the event attribute (you can directly obtain the window in IE. event), we need to input an event object when calling the
Original link: https://my.oschina.net/u/2344787/blog/400507?p={{page}} 1. Selenium Webdriver The Get method will wait until the page has finished loading before executing, but if the load time is too long it will cause subsequent operations to fail.For example: Get Autohome page will wait for a long time, in fact, the basic elements of the page has been loaded, can be used for subsequent operationsThe time can be set by the Set_page_load_time() method,Then catch the timeout exception and stop th
Today, when you get the option element in select and then convert the option character to an Li character through a regular expression, you can succeed in Chrome FF Opera, or the option character under IE.Use the alert () Pop-up box to print out the printed HTML element tag names in uppercase.That's how it's written:Optionsui = optionsui.replace (/(option)/g, "Li");After the changes are written like this:Optionsui = optionsui.replace (/(option)/gi, "L
However, DOM. style can only access In fact, there are other ways to read the style information. There are two methods, one is through the document. styleSheets object, and the other is through the "final style" object. In IE, this object is called currentStyle, and in FF, this object is called document. defaultView. I packed these two classes and made a function for accessing style information, as shown below:Copy codeThe Code is as follows:// ======
Tip: you can modify some code before running Use JavaScript compatible with IE and FF to control Flash operationsUse JavaScript compatible with IE and FF to control Flash operations与之间-->与之间--> Tip: you can modify some code before running
The same login code, FF no problem, IE is not.
Login page: login.php
A total of three pages, want to open the other two pages, if not logged in, will first jump to the login page.
Enter user name eye password is correct, save to session, this time can browse each page freely, do not need to log in repeatedly.
There is no problem in FF, as expected,
The login page has been displayed in IE and the session ha
Originally is a very simple function, but at the beginning of the time, there are IE can be achieved, FF is always unable to achieve, on the internet to see a half-day, also did not make a reason, so in the help of colleagues, finally out, the compatibility of the browser or the details of the above things, all about the details, I will use the notes marked out.
Here to share the project is a small demand, originally very simple, but the whole of a l
In the construction of the site will often encounter, Div layer by flash block or div layer by video file blocking the situation
In the use of Z-index no effect, and finally found a very concise answer, first recorded to facilitate the same problem to meet the next solution.
Flash solution, the code is as follows:
Focus:
1. 2.
Add wmode= "Transparent" attribute in Video file resolution, the code is as follows:
Description: windowlessvideo= "1″ plus this parameter is very important, in
When using $ ("#id"). attr ("color") gets the color, IE and FF are different. For a simple example:
Copy Code code as follows:
Use $ ("#id"). attr ("color") gets the value "green" in Ff,chrome and the value obtained in IE is "#008000".
So, if you use attr ("color") to determine the current color, consider compatibility needs to determine both the color name and the corresponding color code.
FF Browser
. test{
height:20px;
Background-color:orange;
}
IE7 Browser
*+html. test{/*ie7*/
height:20px;
Background-color:blue;
}
IE6 Browser
*html. test{/*ie6*/
height:20px;
Background-color:black;
}
The above CSS code shows that FF is still the most obedient browser. In IE6 and IE7 if you want to use hack you must precede with the tag HTML.
Here is a good memory, IE6 plus *html, and IE7 plus *+html,
the table feeFunction setClf (){} This is an improvement on the dynamic addition of tables written earlier. The previous one was actually a failed piece of work that didn't take long to learn about js. Now it is compatible with FF and IE. In the process of compatibility, the standard dom specification has not been carefully read, and a lot of knowledge has been improved. When js operations on dom are reviewing the ms DHTML manual, pay attention to wh
This article mainly introduces the performance and solution of the onchange event in IE and FF. If you need it, you can refer to it, I hope it will be helpful to you. In a recently developed project, there is a checkbox on the page. When you select or cancel this checkbox, A jsonp request will be sent to the backend. At that time, the implementation was to add an onchange event for this checkbox, but the results were unexpected. For this reason, I hav
to each browser. The following are unique methods:Pagex:ff unique, the mouse position on the page, from the top left corner of the page to locate, this can be very convenient to locate the entire page, IE does not directly replace the properties.LAYERX:FF is unique, the mouse relative to "the element of the triggering event is closest to the element in the hierarchy, set the position parent element" the position of the boundary, starting from the upper left corner of the border, that is, if the
1. DescriptionFor a countdown JS script, see my previous articleArticleAfter the artist adds flash, the DIV layer is blocked by flash. It should be said that this is a classic problem, I also found a solution for blocking flash and DIV in different browsers for a long time;CSS: Z-index is used on the Internet to solve the problem, but the effect is not good.The real solution is:For IE, add the following labels to For ff and chrome, the above settings
The DIV of float must be closed. Example: (floata and floatb attributes have been set to float: Left ;) The notfloatc here does not want to continue translation, but wants to move down. This sectionCodeThere is no problem in IE, and the problem lies in ff. The reason is that notfloatc is not a float label and must be closed. Add . Clear {clear: Both ;} In addition, to enable automatic height adaptation, overflow: hidden should be added to the w
must be valid in HTML, and the specific CSS should be prepared for a specific browser, so it is difficult to manage them. You must prepare more than two sets of CSS for the 2nd types. 3rd types are not recommended and not supported by W3C, but are currently used by most developers.
Now IE6, IE7, and FF have roughly the same interpretation of the box model, both of which are the actual box width = Box content width + inner patch value + Border width.
It introduces the practice of ie/Firefox compatibility page commonly used on Web pages, and gives the code, quite practical. In order to facilitate people to read the code, the following with IE instead of Internet Explorer, MF/FF instead of Mozzila Firefox. The following is the point of entry:Window.eventIE: There are window.event objectsFF: No Window.event object. You can pass an event object to a function's arguments. such as Onmousemove=domousemov
CSS hack: Display different effects for Ie6,ie7,firefox This is also important when you are using a website to measure the level of a div+css architect. Different browsers to distinguish CSS hack:Difference IE6 with FF:Background:orange;*background:blue;Distinction between IE6 and IE7:Background:green!important;background:blue;Difference IE7 with FF:Background:orange; *background:green;Difference ff,ie7,ie6:Background:orange;*background:green!importan
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.