SoFunction
Updated on 2025-04-10

JavaScript study notes (onchange, etc.)

Its onpropertychange, oninput

In IE, you can use onpropertychangel to trigger listening immediately.
oninput can be used under FF, but the event must be bound by the addEventListener recommended by w3c.
https:///article/
2. <button></button> also has type attributes:
I rarely use the input tag. Today, I use buttons on the development side and say how to submit under ff is the same as submitting. I checked the manual and found that the button has the type attribute value: submit reset button. In my impression, it is a button, and it is wrong. .
And this tag is different in defaults under IE and ff. It is button under IE and submit. Therefore, click this button under Firefox and submit.


attr href attribute:
The universal jquery does not eliminate the different compatibility issues in finding href values. In IE, you can use ("href", 2) to make its second parameter 2 to get the normal attribute value, refer to:

/blog/javascript/;/en-us/library/ms536429(VS.85).aspx

And it was found that IE8 has eliminated this problem. When using jQuery load to embed a page, the href in this page has changed under IE. At this time, the person who gets the absolute address is still the one who uses ("href", 2) in time.
Reference /topic/href-attribute-ie-vs-standards-browsers second floor