Foucs/Blur für Formlarteste (hier moo)


/ Published in: jQuery
Save to your folder(s)

das ist in mootools syntax


Copy this code and paste it in your HTML
  1. $('name').addEvent('focus', function(){ if(this.value=='name') this.value=''; }); $('name').addEvent('blur', function(){ if(this.value=='') this.value='name'; }); $('email').addEvent('focus', function(){ if(this.value=='e-mail') this.value=''; }); $('email').addEvent('blur', function(){ if(this.value=='') this.value='e-mail'; }); $('message').addEvent('focus', function(){ if(this.value=='message') this.value=''; }); $('message').addEvent('blur', function(){ if(this.value=='') this.value='message'; }); });

URL: http://davidpraznik.com/templates/davidpraznik/js/js2.php

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.