首页 > 代码库 > 基于artDialog的扩展
基于artDialog的扩展
/* * * 引用此文件必须引用以下两个资源文件,并且还要引用jQuery * <link href="http://www.mamicode.com/ui-dialog.css" rel="stylesheet" type="text/css"/> * <script type="text/javascript" src="http://www.mamicode.com/dialog-plus-min.js"></script> * */ var myDialog = { showTips: function(content, title, showTime, close, isModal) { title = title || "消息"; isModal = isModal || true; var d = dialog({ fixed: true, title: title, content: content, onclose: close }); if (isModal) { d.showModal(); } else { d.show(); } if (showTime > 0) { setTimeout(function() { d.close().remove(); }, showTime); } return d; }, openWindow: function(url, title, width, height, close, isModal) { width = width || 500; height = height || 500; isModal = isModal || true; var iframe = $(‘<iframe/>‘, { src: url }); iframe.css(‘width‘, width); iframe.css(‘height‘, height); var d = dialog({ fixed: true, title: title, content: iframe, onclose: close }); if (isModal) { d.showModal(); } else { d.show(); } return d; }, openDialog: function(content, title, width, height, close, isModal) { title = title || "消息"; isModal = isModal || true; var d = dialog({ fixed: true, content: content, title: title, width: width, height: height, onclose: close }); if (isModal) { d.showModal(); } else { d.show(); } return d; }, openConfirm: function(content, title, ok, cancel, close) { title = title || "消息"; var d = dialog({ fixed: true, title: title, content: content, okValue: ‘确定‘, ok: ok, cancelValue: ‘取消‘, cancel: cancel, onclose: close }); d.showModal(); return d; } }
基于artDialog的扩展
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。