Posted By

tomdowning on 09/21/11


Tagged

form


Versions (?)

Javascript check & clear input field


 / Published in: JavaScript
 

apply to form fields, on click clear field

  1. function clearField(field) {
  2. field.value = '';
  3. }
  4. function checkField(field, label) {
  5. if(field.value == '') field.value = label;
  6. }

Report this snippet  

You need to login to post a comment.