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, height, width, close, isModal) { height = height || 500; width = width || 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, height, width, close, isModal) { title = title || "消息"; height = height || 500; width = width || 500; isModal = isModal || true; var d = dialog({ fixed: true, content: content, title: title, height: height, width: width, 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; } }
转载于:https://www.cnblogs.com/Jarvan-Chan/p/5991735.html
相关资源:JAVA上百实例源码以及开源项目