I need help, how to insert variable n as XX. Variable n is number, for example 3 and I need to get this number to document.form1.any3.value;
is it possible? Thanks for advice
function pokus(n){
var any1 = document.form1.anyXX.value;
}
I need help, how to insert variable n as XX. Variable n is number, for example 3 and I need to get this number to document.form1.any3.value;
is it possible? Thanks for advice
function pokus(n){
var any1 = document.form1.anyXX.value;
}
Use square bracket notation:
function pokus(n){
var any1 = document.form1['any'+n].value;
}