Is there any way to change this code of input with jquery?
Hi all. I need to find an alternative to do the same but with jquery. Please
- <body>
- <input style="color:#666" type="text" id="Name" name="Name" value="Name end Reason" onfocus = "if(this.value=='Name end Reason') {this.value=''; this.style.color='#333'}"
- onblur="if(this.value=='') {this.value='Name end Reason'; this.style.color='#666'}" />
-
- <input style="color:#666" type="text" id="Surname" name="Surname" value="Surname" onfocus = "if(this.value=='Surname') {this.value=''; this.style.color='#333'}"
- onblur="if(this.value=='') {this.value='Surname'; this.style.color='#666'}"/>
- <input style="color:#666" type="text" id="Address" name="Address" value="Address" onfocus = "if(this.value=='Address') {this.value=''; this.style.color='#333'}"
- onblur="if(this.value=='') {this.value='Address'; this.style.color='#666'}" />
- </body>