carefree Posted December 3, 2007 Share Posted December 3, 2007 I have a search portal on my site, but i have to click the <input> box before I can search for something. <input name="search" type="text" id="search" size="60"> Is there a way to make the prompt appear in the <input> box by default?? Link to comment https://forums.phpfreaks.com/topic/79932-solved-make-prompt-appear-by-default/ Share on other sites More sharing options...
phpQuestioner Posted December 3, 2007 Share Posted December 3, 2007 <script language="javascript"> window.onload=function() { document.getElementById('search').focus(); } </script> <input name="search" type="text" id="search" size="60"> Link to comment https://forums.phpfreaks.com/topic/79932-solved-make-prompt-appear-by-default/#findComment-404882 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.