2017-01-02 50 views

回答

2

逗號分開multiple selectors

$('#update,#close').click(function(){ // If update OR close button is clicked   
    //do something here  
}); 
0
$('#update,#close').click(function(){ // If update OR close button is clicked  

    //do something here 

}); 

使用逗號(,),以單獨的選擇...

+0

@ Pranav的回答很明顯的騙人貨...: / –

0

您可以使用逗號,

$('#update, #close').click(function(){ 
    //do something here 
}); 
0
$(document).ready(function(){ 
     $('#update, #close').on('click', function(){ 
      //do something here 
     }); 
    }); 
相關問題