標題:點擊 input 文字框內之預設文字時就移除預設文字的方法 出處:A.PAO designSTUDIO BLOG 時間:Tue, 28 May 2019 14:04:16 +0000 作者:apao 地址:https://blog.apao.idv.tw/post/1294/ 內容: ▼加在一般 html 方法,以下的「輸入內容」要同時輸入兩邊。 說明:使用onfocus 事件,檢查value的內容,如果是初始內容,就將內容清空 ▼DEMO try it: 送出內容 ▼加在HTML5 的方法 說明:輸入文字時,預設文字才會消失。 ▼DEMO try it: 送出內容 Generated by Bo-blog 2.1.1 Release