present2002
Programmer
How can you reset one field in a multi-field
form without reseting the remaining fields
form without reseting the remaining fields
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
var clone = new Array();
function cloneForm(){
for(var i=0;i<document.formName.elements.length;i++){
clone[document.formName.elements[i].name]=document.formName.elements[i].value}
}
function resetField(field){
document.formName[field].value=clone[field];
}
window.onload=cloneForm;