Let's say I had something like any of the following:
<img src="image001.jpg"> <img src="../image001.jpg"> <img src="http://localhost/image001.jpg"> Using JavaScript (no jQuery and no CSS please), is it possible to style the image(s) in question, outside of the <img> tag.
For example if I have a website and I use Google Chrome Inspect>console, could I set a style on an image? Something like:
var images = document.querySelectorAll("img"); for(var i = 0;i < images.length;i++){ var image = images[i].src; if (image.indexOf('mystring') !== -1) { console.log(image); }