I\'ve been using
document.forms[0].fieldname.value
to get values in javascript from a form, but I\'d like to use a name to reference the f
Giving each element an unique id and using this id with the getElementById function is recommended:
var value = document.getElementById('idofelement').value;