做网站|网站建设,就上易助科技网

前端技术文档及相关资料下载

关于前端html、css、js等技术上的各种疑难棘手问题的解决方案探讨及相关资料下载!

JQuery表单提示信息插件jquery.formtips.js
来源:易助科技网浏览量:3收藏

简介

jquery.formtips.js是一款JQuery表单提示信息插件,它可以在文本框中以浅色的字符串提示用户如何输入,以提高表单输入时的可操作性。

参数说明:

tippedClass:'class'  //指定tip的样式


使用

1.  引入 jquery.js 和 jquery.formtips.js 文件


2.  HTML

<form id="formContact" name="formContact" method="post" action="">
<dl>
<dt>姓名</dt>
<dd><input type="text" name="name" id="name" title="请输入您的姓名。" value="" size="20" maxlength="256" /></dd>
<dt>拼音</dt>
<dd><input type="text" name="kana_name" id="kana_name" title="请输入姓名的拼音。" value="" size="20" maxlength="256" /></dd>
<dt>我要反映问题</dt>
<dd><textarea name="message" id="message" title="如果您有任何问题,请在此输入。" cols="20" rows="5"></textarea></dd>
</dl>
<input type="submit" name="submitbtm" id="submitbtm" value="提交" />
</form> CSS

.tipped {color: #bbb;}


3.  调用

<script>
$(function() {
$('form input.help, form textarea.help').formtips({
tippedClass: 'tipped'
});
});
</script>


相关链接

GitHub 地址 :https://github.com/docstun/jquery-formtips