Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to get all scripts on a page javascript

var scripts = document.getElementsByTagName("script");
for (var i = 0; i < scripts.length; i++) {
  if (scripts[i].src) {
  	console.log(i, scripts[i].src);
  } else { 
    console.log(i, scripts[i].innerHTML);
  }
Comment

PREVIOUS NEXT
Code Example
Javascript :: como colocar dados no firebase 
Javascript :: jest test thunk 
Javascript :: how to send headers using swr 
Javascript :: alpinjs 
Javascript :: loop map with key value pair js 
Javascript :: nodejs get prosses id 
Javascript :: react loop return 
Javascript :: discord.js bot presence 
Javascript :: normal function vs arrow function 
Javascript :: button ref react 
Javascript :: react effect hook 
Javascript :: jest simulate toggle switch rn 
Javascript :: popos not showing applications 
Javascript :: react popup 
Javascript :: js get files 
Javascript :: Get Input arrays 
Javascript :: Function.prototype.bind polyfill 
Javascript :: array con doble javascript 
Javascript :: react convert table to pdf 
Javascript :: how to mouse hover svg 
Javascript :: how to clear all slash commands 
Javascript :: react native detect platform 
Javascript :: console.log object functions js 
Javascript :: getusermedia close stream 
Javascript :: json schema eg 
Javascript :: axios.get Uncaught (in promise) TypeError: response.json is not a function 
Javascript :: how to test usehistory in jest 
Javascript :: how to set image width and height dynamically in javascript 
Javascript :: threejs heart 
Javascript :: string js 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =