📜  点击功能上的 jquery - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:15.338000             🧑  作者: 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