ciao a tutti
ho un pulsante che azzera i campi di un form dove esistono 2 select.
per riportare il valore delle select a quello iniziale (vuoto) ho pensato di fare in questo modo:
codice:
var nameChoiceObj = window.document.forms[0].elements['name'];
var nameChoiceObjValue = nameChoiceObj.options[nameChoiceObj.selectedIndex].value;
var surnameChoiceObj = window.document.forms[0].elements['surname'];
var surnameChoiceObjValue = surnameChoiceObj.options[surnameChoiceObj.selectedIndex].value;
nameChoiceObjValue = "";
surnameChoiceObjValue = "";
così però non funziona. come potrei fare?
grazie