优势
不需要通过js来实现placeholder效果,跟现代浏览器一样的配置placeholder属性即可
可以在vue和react中正常渲染
使用方法
<input name="username" placeholder="请输入用户名">
注意事项
ie9-placeholder.css和ie9-placeholder.htc 必须要与根文件路径同级,比如根文件是index.html那么在 index.html中引入插件的代码需要写成
<link rel="stylesheet" href="./ie9-placeholder.css">