I tried for like 15 mins now and for some reason adding is different then removing
function ImageSize(n) { image = document.getElementById("img2"); var width = image.getAttribute("width"); var height = image.getAttribute("height"); if(n == 1) { image.setAttribute("width",(width + 10)); } else if(n == 0) { image.setAttribute("height",height - 10); } }
the - 10 works perfectly, but when I try to add 10 it adds like a thousand
1.4m articles
1.4m replys
5 comments
57.0k users