最新消息:

第12款插件:jquery.maxlength.js检查输入文字数目插件

表单插件 杨红伟 5839浏览 0评论

描述:根据指定的最大可输入的文字数目显示当前可以输入的文字数,可以对应单字节和双字节字符,方便用户的输入。
兼容浏览器:兼容所有IE浏览器/Firefox/Google Chrome
官方链接: http://remysharp.com/2008/06/30/maxlength-plugin
JS下载: http://www.ijquery.cn/js/jquery.maxlength.js
预览:  http://www.ijquery.cn/study/demo/maxlength
打包下载:
http://www.ijquery.cn/study/demo/maxlength/maxlength.zip
参数说明:

[code]

'feedback':'对象',  //指定的数据指向
'useInput':true/false   //限制输入,true不可以输入,false可以输入

[/code]

图片展示:

55

JS引用代码:

[js]<script type="text/javascript" charset="utf-8" src="http://www.ijquery.cn/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="http://www.ijquery.cn/js/jquery.maxlength.js"></script>
<script>
$(function () {
$('.limited').maxlength({
'feedback': '.charsLeft'
});
});
</script>

[/js]

HTML代码:

[html]

<form>
<p>您还可以输入:<span></span>字</p>
<textarea maxlength="140" cols="35" rows="10"></textarea>
</form>

[/html]

CSS代码:


Warning: Use of undefined constant PRC - assumed 'PRC' (this will throw an Error in a future version of PHP) in /www/wwwroot/www.ijquery.cn/wp-content/themes/d8-3.0/comments.php on line 17
发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址