Introduction to the use of jquery ready(fn) event_jquery
WBOYOriginal
2016-05-16 17:24:561387browse
1. Event introduction (1) Bind a function to be executed when the DOM is loaded and ready for query and manipulation; (2) Please ensure that there is no registered function in the onload event of the
element. Otherwise, the $(document).ready() event will not be triggered; (3) The $(document).ready() event can be used unlimited times in the same page; (4) The functions registered in it It will be executed in sequence (in the code). 2. Event format $(document).ready(function(){ //jQuery code }); 3. Example
4. The results are as follows: (1) When "Male" is selected
(2) When "Female" is selected
Statement:
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