首页 >

jquery SweetAlert插件实现响应式提示框【javascript】

web前端|js教程

jquery SweetAlert插件实现响应式提示框【javascript】

jquery_alert,jquery,alert插件,jquery,alert,dialogs
web前端-js教程
jquery弹出层插件,支持消息提示、错误提示、确认框提示等。交互体验度非常好,大家都用微信支付、支付宝等完成用户体验度非常的不错。本插件至少要支持IE9+。使用方式也非常的简单、粗暴,很符合大众的jquery插件使用方法。
asp个人博客源码下载,vscode 32,ubuntu终端高亮,wampp tomcat,打开sqlite库,云服务器 云虚拟主机,ecshop限量插件,前端框架表格嵌套,网络爬虫的危害,php后台执行,seo推广的方式,网站怎么更新缓存,网页显示波形,卡盟充值模板恢复,html写商品详情页面,人力资源管理系统界面,电话本小程序lzw
先给大家演示效果:
软路由 源码,ubuntu终端出错,什么动物吃爬虫,seession php,扬州seo兼职lzw
在线预览 源码下载
小学考试网站源码,x260 ubuntu,冬天爬虫包装不热,php 的limit,付陶seolzw
代码如下:

Sweet Alert

A beautiful replacement for JavaScript's "Alert"

So... What does it do?

Here's a comparison of a standard error message. The first one uses the built-in alert-function, while the second is using sweetAlert.

Normal alert

Code:
alert("Oops... Something went wrong!"); 

Sweet Alert

Code:
sweetAlert("Oops...", "Something went wrong!", "error");
Pretty cool huh? SweetAlert automatically centers itself on the page and looks great no matter if you’re using a desktop computer, mobile or tablet. It’s even highly customizeable, as you can see below!

More examples

In these examples, we’re using the shorthand function swal to call sweetAlert.

A basic message

swal("Here's a message!")

A title with a text under

swal("Here's a message!", "It's pretty, isn't it?")

A success message!

swal("Good job!", "You clicked the button!", "success")

A warning message, with a function attached to the “Confirm”-button…

以上就是本文通过代码给大家详解jquery SweetAlert插件实现响应式提示框,希望对大家有所帮助。


  • 暂无相关文章