input元素獲取焦點時,placeholder內容清空

在input搜索中,發現用placeholder以後不像value值同樣能直接獲取焦點清除。app

要是在js中用函數的話會比較麻煩,因此能夠用這種方法:函數

會很方便 (注意 單雙引號的使用spa

 

相關文章
相關標籤/搜索