This time I will bring you jQueryHow to trigger the click event by default on the running pageEvent, and what are the notes to implement the jQuery running page to trigger the click event by default, The following is a practical case, let’s take a look.
For example:
1. $("#txt").trigger("click");//Default trigger clickSearchButton
2. $(".aaa .bbb").eq(0).click(); //The default is the first click (such as UL's LI has multiple clickable ones. The first one is clicked by default)
Note:
should be placed in function Outside, otherwise it won’t work
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to the php Chinese website Other related articles!
Recommended reading:
How to use on and click in jquery
Tree shape in layui about values Detailed explanation of value passing
What problems will ajax encounter when requesting data
jquery realizes that after clicking a link, the link changes For custom color effects
The above is the detailed content of How to trigger click event by default on jQuery running page. For more information, please follow other related articles on the PHP Chinese website!