Placeholder in IE8 and older
生活随笔
收集整理的這篇文章主要介紹了
Placeholder in IE8 and older
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
為什么80%的碼農都做不了架構師?>>> ??
????? ? 在前端開發中,Input需要有提示信息,在Chrome等瀏覽器中可以方便的使用placeholder屬性,但是在IE8 or older瀏覽器中會出現無法顯示的問題,如果開發自己去寫一個function來進行提示信息的顯示和清除,可能會增加前端的編碼量,另外,可能會有一些考慮不到的點。所以推薦直接使用較為流行的Plugin來完成:
0.節點直接使用placeholder屬性:
<input type="text" name="name" placeholder="Geek4J">1.在JS中進行事件綁定:
$('input').placeholder();Reference:https://github.com/mathiasbynens/jquery-placeholder
轉載于:https://my.oschina.net/geek4j/blog/688699
總結
以上是生活随笔為你收集整理的Placeholder in IE8 and older的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: logrotate切割日志rsyslog
- 下一篇: VMware推出TrustPoint产品