typeCount组件

Intro

TypeCount插件是一个字数监听统计插件,它支持以下两种控件:

1、input[type="text"]
2、textarea

Author

name:janking
concat:[email protected]

Example

http://codepen.io/SeasonDe/pen/grWakG

Options

Methods

Usage

/* html:input */
<div class="input-typeCount">
   <input type="text" class="form-control" id="inputEmail3" placeholder="你可以输入最多10个字符">
   <span class="count">0/10</span>
</div>

/* html:textarea */
<div class="col-sm-10 input-typeCount">
   <textarea class="form-control" rows="3" placeholder="你可以输入最多20个字符"></textarea>
   <span class="count">0/20</span>
</div>

/* js */
$('.input-typeCount').IUI('typeCount');

Attention

请注意它的html代码结构,如下
* div.J-typeCount > input + span.count
* div.J-typeCount > textarea + span.count

results matching ""

    No results matching ""