swal用法
swal({
title: "确认删除?",
text: "Your will not be able to recover this imaginary file!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "确认",
cancelButtonText: "取消",
closeOnConfirm: false,
closeOnCancel: false
},
function(isConfirm){
if (isConfirm) {
swal("Deleted!", "Your imaginary file has been deleted.", "success");
} else {
swal("Cancelled", "Your imaginary file is safe :)", "error");
}
});
function edit(){
swal({
title: "编辑订单",
text: "修改订单金额",
type: "input",
showCancelButton:true,
closeOnConfirm:false,
confirmButtonText:"确认",
cancelButtonText:"取消",
animation: "slide-from-top",
inputPlaceholder: "输入订单金额"
},
function (inputValue){
if(inputValue){
var re = /^[1-9]+[0-9]*]*$/;
if(!re.test(inputValue)){
swal("订单金额只能是一个正整数");
}else{
swal(inputValue);
}
}else{
swal("输入不能为空");
}
}
);
}
可参考地址:
http://www.dglives.com/demo/sweetalert-master/example/
swal用法的更多相关文章
- swal() 弹出层的用法
swal()方法是一个提示框: swal({ title: "", text: "请扫描用户手机上的付款码", type: "input", ...
- EditText 基本用法
title: EditText 基本用法 tags: EditText,编辑框,输入框 --- EditText介绍: EditText 在开发中也是经常用到的控件,也是一个比较必要的组件,可以说它是 ...
- jquery插件的用法之cookie 插件
一.使用cookie 插件 插件官方网站下载地址:http://plugins.jquery.com/cookie/ cookie 插件的用法比较简单,直接粘贴下面代码示例: //生成一个cookie ...
- Java中的Socket的用法
Java中的Socket的用法 Java中的Socket分为普通的Socket和NioSocket. 普通Socket的用法 Java中的 ...
- [转载]C#中MessageBox.Show用法以及VB.NET中MsgBox用法
一.C#中MessageBox.Show用法 MessageBox.Show (String) 显示具有指定文本的消息框. 由 .NET Compact Framework 支持. MessageBo ...
- python enumerate 用法
A new built-in function, enumerate() , will make certain loops a bit clearer. enumerate(thing) , whe ...
- [转载]Jquery中$.get(),$.post(),$.ajax(),$.getJSON()的用法总结
本文对Jquery中$.get(),$.post(),$.ajax(),$.getJSON()的用法进行了详细的总结,需要的朋友可以参考下,希望对大家有所帮助. 详细解读Jquery各Ajax函数: ...
- 【JavaScript】innerHTML、innerText和outerHTML的用法区别
用法: <div id="test"> <span style="color:red">test1</span> tes ...
- chattr用法
[root@localhost tmp]# umask 0022 一.chattr用法 1.创建空文件attrtest,然后删除,提示无法删除,因为有隐藏文件 [root@localhost tmp] ...
随机推荐
- 织梦首页TAG标签页的仿制
1,tag标签的作用:主要是为了能够使得用户可以更加精确的找寻到自己所需内容.这种TAG搜索方式,比分类搜索更加的精确.具体以及节省时间. 2,怎么能够合理的优化TAG标签? A:明白网站的TAG标签 ...
- 创建oracle数据库job服务
创建oracle数据库job服务:PlSqlDev操作job https://www.baidu.com/link?url=5vXhw0IqjvWEAgGSIYsSEVPvJb6njGkJ-_P_VF ...
- 《C-RNN-GAN: Continuous recurrent neural networks with adversarial training》论文笔记
出处:arXiv: Artificial Intelligence, 2016(一年了还没中吗?) Motivation 使用GAN+RNN来处理continuous sequential data, ...
- Java ServerSocket的服务端代码介绍
转自:http://developer.51cto.com/art/201003/190007.htm 所谓Java ServerSocket通常也称作"套接字",有不少的时候需要 ...
- Pessimistic Offline Lock悲观离线锁
每次只允许一个业务事务来访问数据,以防止并发业务事务中的冲突. 离线并发处理通常会出现多个业务事务操作同一数据. 最简单的办法是为整个业务事务保持一个系统事务.但是事务系统不适合于处理长事务. 首选乐 ...
- Spring--quartz中cronExpression配置说明
Spring--quartz中cronExpression Java代码 字段 允许值 允许的特殊字符 秒 0-59 , - * / 分 ...
- Oracle:ORA-12154: TNS:could not resolve the connect identifier specified
ORA-12154: TNS: 无法解析指定的连接标识符 注册表:regedit 安装oracle后用Net Manager 配置好服务名称之后,测试成功,可是PL/SQL无法连接 http://we ...
- 520. Detect Capital(检测数组的大小写)
Given a word, you need to judge whether the usage of capitals in it is right or not. We define the u ...
- CodeForces 722B Verse Pattern (水题)
题意:统计元音,这里多加一个元音,y. 析:直接统计就好了. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000" ...
- maven配置文件注意事项
1:安装完成后在C:\Users\Administrator\.m2有一个文件settings.xml需要修改一下配置 2:设置maven从网上下载的jar包.(时间长会很大).我设置它保存我的电脑位 ...