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=''; Link to comment https://forums.phpfreaks.com/topic/158044-what-is-the-easiest-way/ 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. Link to comment https://forums.phpfreaks.com/topic/158044-what-is-the-easiest-way/#findComment-833710 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. Link to comment https://forums.phpfreaks.com/topic/158044-what-is-the-easiest-way/#findComment-834301 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.