/ Published in: JavaScript
Reset input type text onfocus if value differs from default.
Expand |
Embed | Plain Text
<script type="text/javascript"> $(document).ready(function(){ $("input[type=text]").focus(function(){ if(this.value == this.defaultValue){ $(this).val(""); } }); }); </script>
You need to login to post a comment.
