本文實例講述了JavaScript實現文本框中默認顯示背景圖片在獲得焦點后消失的方法。分享給大家供大家參考。具體如下:
html代碼:
?
1 2 3 4 5 6 7 8 9 <form name="searchform" id="search-form"> <div> <b>Search</b> <input type="text" name="txtInput" title="Enter the terms you wish to search for." /> <input type="submit" value="GO!" class="submit" style="cursor: pointer;" /> </div> </form>JS代碼:
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18希望本文所述對大家的javascript程序設計有所幫助。
新聞熱點
疑難解答