I want to disable all the fields but the first and I don't want to put 39 instructions to do that.
How can I cycle through all those fields?
Fileds' names are img1, img2, img3,... , img40.
I'm trying with this code, but it doesn't work
var form = document.getElementById("add");
var i;
var image;
for(i=2;i<41;i++) {
image = "img"+i;
form.image.disabled = true;
}


Sign In
Create Account


Back to top









