/ Published in: jQuery
das ist in mootools syntax
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$('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