I'm trying to make a button to clear the forms on a page. I have this as the onclick
...but it does nothing. Am I missing something important?
Code:
for (f in document.forms) {
for (e in document.elements) {
if (e.type == 'text'){
e.value = '.';
} else if (e.type == 'select') {
e.selectedIndex = 1;
}
}
}
...but it does nothing. Am I missing something important?