What does the selector syntax mean in $( “
” ).text( message )

前端 未结 6 1644
旧巷少年郎
旧巷少年郎 2021-01-03 15:50

What does the selector

syntax mean in this code? I\'ve seen selectors like div or #someId but I\'m confused what the
6条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-03 15:57

    $('

    ') will not select a div from your html, but create a new one. Also it can be written like $('
    ')
    , first one is just a shorthand for second.

提交回复
热议问题