jquery选择器$(this).find('input[typ

2019-06-17  本文已影响0人  毛毛v5
$(this).find('input[type="submit"]:not(.cancel), button').click(function (){});

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
$(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
  );
上一篇 下一篇

猜你喜欢

热点阅读