jquery的click笔记

jquery的click笔记

// Auto listCustomers
$(document).ready(
function () {
console.log(“listCustomer click…”);
$(“#listCustomers&quo…

// Auto listCustomers
$(document).ready(
function () {
console.log("listCustomer click...");
$("#listCustomers").click();
}
);

// List customers
$("#listCustomers").click(
function () {
console.log("listCustomer click...");
}
);

上面是可以一开始便触发$(“#listCustomers”)的click事件,但是换成下面的就不行了

$(document).ready(
$("#listCustomers").click(
function () {
console.log("listCustomer click...");
}
);
);

放在$(document).ready()里就不行了

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×