代码语言:javascript复制
$(this).find('input[type="submit"]:not(.cancel), button').click(function (){});
代码语言:javascript复制Basically it is looking for elements located within this that has the following requirements
is an input
has type = submit
does not have a class of cancel
OR
is a button
代码语言:javascript复制$(this) // within this jQuery object
.find(' // find all elements
input[type="submit"] // that are input tags of type "submit"
:not(.cancel) // and do not have the class "cancel"
, // or
button // are button elements
')
.click( // and for each of these, to their click event
function (){} // bind this function
);