jquery模拟用户行为
//demo1,not use bind var $user = $("#recovery_database_create_wizard_domain_name"); $user.click(function(){ alert("function with no bind"); }); $user.click(); //demo2,use bind var user_function = function(){ alert("this is user action simulator"); }; $user.bind("click", user_function); $user.click();
2.toggle中的两个函数轮流执行,在click时实行
var function1 = function(){ alert(1); }; var function2 = function(){ alert(2); }; $("#recovery_database_create_wizard_server_user_name").toggle(function1, function2);
相关推荐
wetyu 2020-06-21
探索世界改变世界 2019-12-28
songerxing 2019-12-27
ikk 2019-10-24
yongjianluo 2018-12-25
ibatsiSpring 2011-12-08
PasserbyX 2010-11-30
spring艳 2019-06-30
hualalalalali 2019-06-30
数据中心运维管理 2019-06-21
Seoers 2016-05-03
mzdanvy 2015-12-23
ycsx0 2011-10-08
chaojilaji 2008-11-02
LHISLH 2016-05-05
DonviYang 2019-05-07
JennyHermes儿 2017-06-09
aiwozhiai 2018-07-14
网络菜市场 2019-03-19