本文实例讲述了一款轻量级的表单提示插件---jquery form toolltip。分享给大家供大家参考。具体如下:
jQuery Form Toolltip 特点:
运行效果截图如下:

具体代码如下:
jquery实例:jQuery Form Toolltip使用方法
引入核心文件
<script src="js/jquery/2.1.1/jquery.min.js"></script> <script src="src/jquery.formtooltip.js"></script>
构建html
RealAdmin后台管理系统模板基于jquery.flot.js、jquery.min.js、jquery.tipsy.js和jquery.validate.js等插件制作,蓝色简洁,包含后台登录页面和后台操作页面。有通知、访问统计、TAB选项卡列子、图片相册、表单、手风琴插件、提示信息、表格等网页元素,兼容IE6。
133
<form id="formname"> <table> <tr> <td> Title </td> <td><input type="text" value="blank" name="title"/></td> </tr> <tr> <td> Name </td> <td><input type="name" value="Blank Name" name="name"/></td> </tr> <tr> <td> Color </td> <td><input type="color" value="#000FFF" name="color"/></td> </tr> <tr> <td> TextArea </td> <td><textarea type="month" value="" name="text"></textarea></td> </tr> </table> </form>
写入JS初始化
$(document).ready(function(){
var fields = {
title: {
tooltip : "This field is actually for bla bla bla...</br>and bla bla bla",
position: 'bottom'
},
name : {
tooltip: "This is for fun!!!!", //提示的信息
position: 'right', //动画的方向
backgroundColor: "#FF0000", //背景颜色
color: '#FFFF00' //字体颜色
},
color : {
tooltip: "This is for your cover color~~~<a href='#'>here</a>"
},
text : {
tooltip: "Please provide your comment here."
}
};
//Include Global Color
$("#formname").formtoolip(fields, { backgroundColor: "#000000" , color : "#FFFFFF", fontSize : 15, padding : 10, borderRadius : 5});
});
定义fields数组,把需要提示的表单字段依次写入,然后调用formatoolip函数初始化。
以上就是为大家分享的jQuery表单提示插件:jQuery Form Toolltip ,很实用,希望大家喜欢。
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号