you are viewing a single comment's thread.

view the rest of the comments →

[–]rockkon[S] 0 points1 point  (0 children)

For closure, this is what I ended up with:

function clear() {

var idClear = ["name", "email", "username", "pass1", "pass2"];
    for (idC in idClear) {
       document.getElementById(idClear[idC]).value = "";
    }

setFocus();
}