Internet Explorer is replaced by IE, and mozzila FF is replaced by ff.
1. Document. Form. Item Problems
Existing problems:ExistingCodeThere are many statements such as document. formname. Item ("itemname"), which cannot be run in ff.
Solution:Use document. formname. elements ["elementname"]
2. Collection class Object Problems
Existing problems:In the ex
Javascript will inevitably be used for BS development, and each browser has different support for javascript. This requires our programmers to be compatible with their following JavaScript scripts that are compatible with IE and FF (some of them are selected from the Internet and sorted by myself). I hope this will help you. /* Replace Internet Explorer with IE, and replace Mozzila Firefox with MF/FF */
//
How do i make IE FF Opera support alpha transparency at the same time? -DIV+CSS Tutorial
The transparent effect of the picture is a special form that needs to be used in the webpage, although not very commonly used, but meet this kind of demand often a bit unprepared.Knowledge about CSS alpha transparency. First, look at the following code:
Filter:alpha (OPACITY=50); /* IE * *-moz-opacity:0.5; /* Moz +
document.documentelement.clientwidth andDocument.documentelement.clientheight.General: Document.body.clientwidth and Document.body.clientheight.6. Adding eventsIe:element.attachevent ("onclick", func);Ff:element.addeventlistener ("Click", Func, True).General: Element.onclick=func. Although you can use the OnClick event, the effect of the onclick and the above two methods is not the same, onclick only executes a process, and attachevent and AddEventListener execute a list of processes, that is,
When developing Web Front-end, we often use JavaScript to obtain the page height and width. However, the method obtained in different browsers is different, or the method is the same, however, because IE and FF have different implementations of the Web standard, the two browsers in the same method obtain different heights or widths. Next, we will compare the page height and width obtained by JS in IE and FF
In the following example, Internet Explorer is replaced by IE, and mozzila Firefox is replaced by MF/ff.
(1) window. Event
IE: window. event object
FF: There is no window. event object. You can pass the event object to the function parameters. For example, onmousemove = domousemove (Event)
(2) current mouse Coordinate
IE: event. X and event. Y.
FF: event. pagex a
DIV+CSS Resolving IE6,IE7,IE8,FF compatibility issues1.IE8 compatibility issues, this best deal, converted into IE7 compatible can be. Add the following piece of code to the head, and then as long as it is compatible under IE7, IE8 below is also compatible:1.2.2.flaot floating caused IE6 double margin problem, this is the most common, but also best to deal with,!important solve, such asUnder the MARGIN-LEFT:10PX!IMPORTANT;/*IE7,IE8,
1. Div centering problemDiv set Margin-left, margin-right for Auto is already centered, ie not, ie need to set the body center, first in the parent element definition text-algin:center; This means that the content within the parent element is centered.
2. Link (A-label) border and backgroundA link with border and background color, need to set Display:block, and set Float:left guarantee not wrap. Refer to MenuBar, set a and menubar height is to avoid the bottom of the display dislocation, i
CSS compatibility with various browsers is already a common issue, and tutorials on the Internet are everywhere. The following content is not too novel. It is a personal summary and I hope it will be helpful for beginners.
I. CSS hack
Hack concept:Different browsers, such as Internet Explorer 6, Internet Explorer 7, and Mozilla Firefox, have different understandings of CSS parsing, which leads to different page effects, we cannot get the page effect we need. At this time, we need to write
These methods are usually used when I find a collection on the Internet, OH, I declare in advance to avoid misunderstanding!
First, CSS HACK
The following two methods can solve almost all hack today.
1,!important
With the support of IE7 to!important, the!important method is now targeted only at IE6 hack. (Note the wording. Remember that the claim position needs to be advanced.)
2, Ie6/ie77 to Firefox
*+html and *html is the unique label of IE, Firefox is not supported. And *+html is IE7 u
In the CSS Forest group to discuss a margin problem inadvertently found overflow can also be used to clear the float, hey, this method is not only simple to use, but also FF, OP, IE7 support, from then on the long compatibility and poor FF clear floating method.
The method is really simple, as long as you add the overflow this property to the label that needs to be floated.
CSS Code
Copy Code code
to the button's click Action, through post submission, for the user input is a text box, the user input to fill in after the item, directly press ENTER, it is equivalent to press the button, At the beginning did not pay attention to this problem, a press RETURN, jump to another page, a lot of data, just found to block the browser's default behavior, because the default behavior is submit form, then your JS will not be implemented. So cancel the default behavior first. Then execute your JQ to su
MediaPlayer online player code compatible with IE and FF
Online player inserts MediaPlayer compatible with IE and FF code debugging in Web pagesInternet Explorer and Netscape support So all two tags have to be written, and attribute values need to correspond.–>Type= "Application/x-oleobject" >Type= "Application/x-mplayer2" autostart= "0" enablecontextmenu= "0" >Description of the player related parameters
The difference between window.event and in IE and FF
The event object is valid only if it occurs.
Some properties of an event are only meaningful for a particular event. For example, the Fromelement and Toelement properties only make sense for Onmouseo tutorials ver and onmouseout events.
Example
The following example checks to see if the mouse clicks on the link and cancels the link jump if the SHIFT key is pressed.
Window.eventie: there are
BS development will inevitably use JavaScript, and each browser's support for JavaScript is different. This requires our programmers to be compatible with them, or some browsers will not be able to run our code. Will create a customer complaint, if let boss know, this is not very good oh.
The following is compatible with IE and FF JS scripting practices and decomposition (some selected from the Internet, by my collation), I hope to help.
. Use IE in
JavaScript seamlessly scroll up and down Gao Dingkuan Pause effect (compatible IE/FF)
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
JavaScript Seamless scrolling around Gao Dingkuan Pause effect (compatible with IE/FF)
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
This article describes the JS implementation compatible with IE, FF, Chrome, opera and Safari music players. Share to everyone for your reference. The implementation method is as follows:
/** Music player * @param obj player ID * @param file Audio file mp3:ogg: * @param loop whether loop/function Audioplayer (ID, file, lo
OP) {var audioplayer = document.getElementById (ID);
if (audioplayer!=null) {document.body.removeChild (Audioplayer); }
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.