jQuery find $.find('selector') versus $('selector') difference

后端 未结 1 1284
感动是毒
感动是毒 2021-01-01 20:11

I\'ve got a question why these two code snippets are different.

$(\'#ctl00_DDMenu1_HyperLink1\')  
//jQuery(a#ctl00_DDMenu1_HyperLink1 Default.aspx) Console          


        
相关标签:
1条回答
  • The reason this does not work is because find() lets you filter on a set of elements based on a selection you've already made.For example if you wanted to select all of the inputs within a particular form, you could write:

    $('#aParticularForm').find('input') 
    

    It cannot be called on its own.

    0 讨论(0)
提交回复
热议问题