项目作者: BiosSun

项目描述 :
An HTML5 placeholder attribute analog.
高级语言: JavaScript
项目地址: git://github.com/BiosSun/sPlaceholder.git
创建时间: 2014-07-05T13:18:13Z
项目社区:https://github.com/BiosSun/sPlaceholder

开源协议:MIT License

下载


sPlaceholder

sPlaceholder 是一个模拟 HTML5 中的 placeholder 属性的 JS 库, 通过它可以实现更加灵活的占位符特性。

详细文档:http://biossun.org/sPlaceholder/

安装

如果你使用 bower,可以执行如下命令来安装 sPlaceholder:

  1. $ bower install splaceholder --save

示例

  1. <input type="text" placeholder="Your name" />

或者:

  1. <div class="placeholder-box">
  2. <input type="text" value="" />
  3. <span class="placeholder-text">Your name</span>
  4. </div>