javascript - Get all div's that doesn't have an id -


What is the most efficient method to get all the divs on that page Jquery or just vanilla js Using an ID if its more efficient I know that I can get all the divs and loop through them and can check whether they have set IDs. I am just curious if the DOM API or Jquery such There is a customized way to do it.

just do (jQuery):

  var divs = $ ( "Div: no ([id])");  

Or, as indicated by @Type well

  document.querySelectorAll ('div: not ([id])')  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -