popcornplya Posted May 14, 2009 Share Posted May 14, 2009 What is the easiest way to put the following in a function? if(this.value=='Search...') this.value=''; Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 14, 2009 Share Posted May 14, 2009 Exactly the way you said it. function somename () { if(this.value=='Search...') this.value=''; } I doubt that's what you're after, but it's what you asked for. Quote Link to comment Share on other sites More sharing options...
popcornplya Posted May 14, 2009 Author Share Posted May 14, 2009 Exactly the way you said it. function somename () { if(this.value=='Search...') this.value=''; } I doubt that's what you're after, but it's what you asked for. That's what I was after, thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.