How to Getting and Setting Image Attibute using javascript in HTML,
it's like generate image HTML Element using Javascript ?
anyone can help me ?
How to Getting and Setting Image Attibute using javascript in HTML,
it's like generate image HTML Element using Javascript ?
anyone can help me ?
Recomended to read Documentation first.
var image = document.images[0];
var width = parseInt(image.getAttribute('WIDTH')); //for get attribute width of image
image.setAttribute("class","thumbnail"); //for setting attribute class of Image
here the documentation attributes of image
https://developer.mozilla.org/en/docs/Web/API/HTMLImageElement