UIkit的confirm,好看点
一,官方推荐的样码。
<button type="button" class="uk-button" onclick="UIkit.modal.prompt('Name:', '', function(val){ UIkit.modal.alert('Hello '+(val || 'Mr noname')+'!'); });">Prompt</button> <pre><code>UIkit.modal.prompt("Name:", value, function(newvalue){ // 点击OK提交后执行 });</code></pre>
二,我实现的样码
var statu = UIkit.modal.confirm("将发布单" + deploy_version + "从" + org_type + "部署到" + env_type + "环境。是否确认?" ,function() { promiseJenkins = $.ajax({ url:'/valid/env_valid/', type: 'post', data:{ deploy_version: deploy_version, env_type: env_type, org_type: org_type, }, dataType: 'json', beforeSend: function(){ $(_self).attr('disabled',"true"); $(_self).append(" <i class='uk-icon-cog uk-icon-spin'></i>"); }, error: function(){ alert('500 Error.'); }, success: function(json){ $(_self).children('i').remove(); $(_self).append(" <i class='uk-icon-check'></i>") window.location.reload(); console.log(json); UIkit.notify(json.return, {timeout: 0}); } }); });
三,LOOK:
UIkit的confirm,好看点的更多相关文章
- iOS Webview 实现修改javascript confirm 和 alert
贴代码: @interface UIWebView (JavaScriptAlert) -(void) webView:(UIWebView *)sender runJavaScriptAlertPa ...
- WWDC 2013 Session笔记 - UIKit Dynamics入门
本文涉及到的WWDC2013 Session有 1.Session 206 Getting Started with UIKit Dynamics 2.Session 221 Advanced Tec ...
- WKWebView捕获HTML弹出的Alert和Confirm
之前用WebView装载一个网页时,弹出Alert时会显示网址,由于不想把网址暴露给用户这样显示就不是很友好了.UIWebView文档内没有找到可以捕获这类信息的API.GOOGLE了下发现了WKWe ...
- 使用UIKit制作卡牌游戏(一)ios游戏篇
转自朋友Tommy 的翻译,自己只翻译了第三篇教程. 译者: Tommy | 原文作者: Matthijs Hollemans写于2012/06/29 原文地址: http://www.raywend ...
- iOS UIKit Dynamics入门 UIKit动力学,实现重力、连接、碰撞、悬挂等动画效果
本文为转载文章 版权归原文所有 什么是UIKit动力学(UIKit Dynamics) 其实就是UIKit的一套动画和交互体系.我们现在进行UI动画基本都是使用CoreAnimation或者UIVie ...
- Yii2 使用 bootboxJS美化confirm窗口
有些关键操作比如删除,我们在执行前一般先弹出来个confirm确认窗口. 在Yii2中为一个操作添加confirm确认很容易.只需在链接出添加一个‘data-confirm' => '确实要添加 ...
- jquery小技巧:使用jquery.confirm和PNotify实现弹出提示和消息提示
在从UIKIT前端换到BOOSTRAP前端时,一些转换的技巧. https://myclabs.github.io/jquery.confirm/ http://sciactive.github.io ...
- 单选按钮加confirm进行判断返回false任被选中问题
<html> <head> <script language="javascript"> var checkValue = "&quo ...
- iOS之UIKit系列教程<一>
前言:博主接触iOS的编程也有一段时间,今天把有关UI控件的一些知识在这里做一些总结. 申明:此系列文章都是使用目前最新版本swift3.0.1进行讲解的,与其他版本可能略有差异. 一,UIKit之设 ...
随机推荐
- ARM寄存器的8种寻址方式01
一.立即数寻址 操作数由指令本身给出 MOV r0,#0x0F //是所有寻址方式里面速度最快的,但是受到合法立即数的限制 立即数要求以#和$开头 十六进制,#后跟0x:十进制,#后直接加:八进制,# ...
- Enhanced RCP: How views can communicate – The e4 way | Tomsondev Blog
Some weeks ago I published how views can communicate using the EventAdmin-Service. To get things wor ...
- centos 减少tty数量的方法
在linux中,包括本文介绍的centos系统中,tty系统默认是给出7个,前六个是terminal,一个用于X. 在centos5.x中减少tty数量,通过修改/etc/inittab来实现. [r ...
- 重拾C,一天一点点_5
switch(表达式){ case 整型常量表达式:语句序列 case 整型常量表达式:语句序列 default:语句序列} while(表达式) 语句 for(表达式1; 表 ...
- Python中Cookie的处理(二)cookielib库
Python中cookielib库(python3中为http.cookiejar)为存储和管理cookie提供客户端支持. 该模块主要功能是提供可存储cookie的对象.使用此模块捕获cookie并 ...
- Microsoft AzureStorageAccount for Powershell
使用Powershell 创建的存储账户,注意StorageAccountName只能使用小写字母以及数字, -Location参考http://www.cnblogs.com/SignalTips/ ...
- ORA-15221: ASM operation requires compatible.asm of 11.2.0.0.0 or higher
昨天在做存储迁移的时候,对ASM磁盘组的东西进行操作时,出现了如标题的错误.经查资料,发现原因如下: 如磁盘组是使用asmca图形化工具创建,则compatible.asm默认设置就已经为11 ...
- poll实现
struct pollfd { int fd; //当前描述符 short events; //进程关心的该描述符的事件 short revents; //返回 ...
- 【http】生命周期和http管道技术 整理中
httpModules 与 httpHandlers 正在写demo public class Httpext : IHttpModule { public void Dispose() { thr ...
- advance 模板 怎么生成module
advance 模板 怎么生成module namespace写什么如果是前台呢就是 frontend\modules\modulename\Module@我叫红领巾 module id有什么用bak ...