JavaScript Learning Notes (onchange etc.) _javascript tips

Source: Internet
Author: User
1.onchange and its onpropertychange,oninput

In IE can use Onpropertychangel to trigger the monitor immediately,
Oninput can be used under FF, but you must use the AddEventListener method recommended by the consortium to bind events.
Http://www.jb51.net/article/25275.htm

2. <button></button> also has the type attribute:
Rarely used in general use input tags, today development that use Button said under the FF how and submit the same, check the manual found button has the Type attribute value: Submit reset button, in my impression he is button, wrong.
And this label in IE and FF under the default, IE under BUTTON,FF for submit, so under Firefox click on this button and submitted


The attr href attribute of 3.jquery:
Universal jquery does not eliminate the different compatibility issues that seek out href values. Under IE, Ele.getattribute ("href", 2) can be used to get the normal property value of the second parameter, and refer to:

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 you use the jquery load to embed a page, the href in this page is changed, and the person who gets it in time using Ele.getattribute ("href", 2) is still an absolute address.
Reference Http://forum.jquery.com/topic/href-attribute-ie-vs-standards-browsers Second Floor
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.