I need to check each src tag value script, and if there is a match, I would like to change the script attribute of the src attributes ... Something like this:
var scripts = document.getElementsByTagName("script")[0].src
for (i=0;i<scripts.length;i++){
if(scripts[i] == "something.js"){
document.getElementsByTagName("script")[i].src = "this.js"
}
else {}
}}
David source
share