Javascript DOM Form clear all text field

Description

Javascript DOM Form clear all text field


function clearTextBoxes() {
    var allInputs = document.getElementsByTagName("input");
    for (var i = 0; i < allInputs.length; i++) {
        if (allInputs[i].type == "text") {
            allInputs[i].value = "";
        }
    }
}



PreviousNext

Related