JS-internal crawler-get all the `img` tags in the webpage

Get all the imgtag catalogs in the webpage


Preface

  • Get all tags in the file through the DOM

Recommended reading

  • "JS Definitive Guide"

Code

for(let key in document.images){
    
    
    console.log(key);
}

let context = Array.prototype.map.call(document.images, (event)=>{
    
    console.log(event)});

Result display

Insert picture description here

Guess you like

Origin blog.csdn.net/u013362192/article/details/114647675