if i put a line of code like that :

document.forms[0].nameoftextbox.value

between the nameoftextbox and value, i want to include a variable in that line so i'll be looping

that the names nameoftextbox_1

nameoftextbox_2
nameoftextbox_3
nameoftextbox_4
nameoftextbox_5

for...x...{

alert(document.forms[0].nameoftextbox_x.value


}

is there a way