Home > Web Front-end > JS Tutorial > javascript study notes (onchange, etc.)_javascript skills

javascript study notes (onchange, etc.)_javascript skills

WBOY
Release: 2016-05-16 18:16:35
Original
1446 people have browsed it
1.onchange and its onpropertychange, oninput

Onpropertychangel can be used to trigger listening immediately under IE.
oninput can be used under FF, but the addEventListener method recommended by w3c must be used. Binding events.
http://www.jb51.net/article/25275.htm

2. also has a type attribute:
It is rarely used and generally uses the input tag. Today, the developer used button and said that it is the same as submit under ff. I checked the manual and found that the button has a type attribute value of: submit reset button. In my impression, it is a button. , wrong. .
And this tag has different defaults under IE and ff. It is button under IE and submit under ff, so click this button under Firefox and submit


3.jquery attr href attribute:
The universal jquery does not eliminate the different compatibility issues in finding the href value. Under IE, you can use ele.getAttribute("href",2) to set the second parameter to 2 to get the normal attribute value. Reference:

http://jsfox.cn/blog/javascript/get -right-href-attribute.html;http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx

And found that IE8 has eliminated this problem. When using jQuery's load to embed a page, the href in the page under IE has been changed. At this time, the person obtained by using ele.getAttribute("href",2) is still an absolute address.
Refer to the second floor of http://forum.jquery.com/topic/href-attribute-ie-vs-standards-browsers
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template