toastr.js 介绍
网页开发中经常会用到 提示 框, 自带 的alert样式无法调整, 用户 体验差。
所以一般通过 自定义 提示 框来实现弹窗 提示 信息,而jquery toastr正是为此的一款非常棒的 插件 。
toastr是非阻塞 通知 的JavaScript库。jQuery是必需的。我们的目标是创建 一个 简单的核心库,可以 自定义 和扩展。
对于其他API 调用 ,看到演示。
<link href="toastr.css" rel="stylesheet"/>
<script src="toastr.js"></script>
// 显示 一个 信息没有 标题
toastr.info('Are you the 6 fingered man?')
其他选项
/ 显示 一个 警告,没有 标题
toastr.warning('My name is Inigo Montoya. You killed my father,prepare to die!')
// 显示 一个 成功, 标题
toastr.success('Have fun storming the castle!','Miracle Max Says')
/ 显示 错误 标题
toastr.error('I do not think that word means what you think it means.','Inconceivable!')
//清除当前的列表
toastr.clear()
网站地址 : http://www.toastrjs.com
GitHub: https://github.com/CodeSeven/toastr
网站描述: 一款轻量级的 通知 提示 框 插件
toastr.js官方网站
官方网站: http://www.toastrjs.com
如果觉得 网站内容还不错,欢迎将 网站 推荐给程序员好友。