How does JavaScript filter elements by style?

< H2 > as mentioned, the document.querySelectorAll () method in JavaScript can only filter elements based on attribute (attributes), but how to filter by style? For example, get all the elements that have background pictures on the page? < / H2 >
Apr.15,2021

div-with-image [style ^ = "background-image:"] [style$= ".jpg)"] ?


element has a style attribute, which should be solved by determining the value of a specific attribute.


the simplest and most effective thing is to manually add an attribute, such as data-img, and then document.querySelectorAll ('[data-img]'), otherwise you can't find background-image/background in the style class

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a510-2c20b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a510-2c20b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?