📌  相关文章
📜  jquery onclick 函数 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:18.101000             🧑  作者: Mango

代码示例6
//1st way
$(".searchCategory").click(function () {
  //your code here
});

//2nd way
$(".searchCategory").on( "click",getCategory);    // getCategory is a function but don't need the pharenthesis
//if you write getCategory() instead of getCategory when getCategory is a function with no pharamenters it might not work