// gets the form object
Var form = document. GetElementById (’ my_form ’);
// username input object user_name is the name attribute of the object
Var userName = form. User_name;
// username is cleared
The userName. Value = ’ ’;
// user password the input object password is the name attribute of the object
Var password = form. The password;
// clear user password
Password. The value = ”;