JEECG自定义弹出框按钮
2018-01-11 13:25
232 查看
<script type="text/javascript"> //弹出框 function createwindowoktext(title, addurl, width, height, oktext, canceltext) { width = width ? width : 700; height = height ? height : 400; if (width == "100%" || height == "100%") { width = window.top.document.body.offsetWidth; height = window.top.document.body.offsetHeight - 100; } //--author:JueYue---------date:20140427---------for:弹出bug修改,设置了zindex()函数 if (typeof (windowapi) == 'undefined') { $.dialog({ content : 'url:' + addurl, lock : true, width : width, //zIndex:1990, height : height, parent : windowapi, title : title, opacity : 0.3, cache : false, /* ok : function() { //去掉确定的方法 iframe = this.iframe.contentWindow; saveObj(); return false; }, */ button:[{ //自定义设置按钮 name: '保存', callback: function(){ iframe = this.iframe.contentWindow;//获取弹出层的iframe saveParam();//自定义保存数据方法 return false;//阻止页面关闭(默认为true不关闭) } },{//设置按钮 name: '关闭', callback: function(){ iframe = this.iframe.contentWindow;//获取弹出层的iframe closeButton();//调用关闭弹出框窗口方法 return false;//阻止页面关闭(默认为true不关闭) } }], // okVal : oktext,//去掉确定按钮 cancelVal : canceltext, cancel : false /*为true等价于function(){}*/ }).zindex(); } else { W.$.dialog({ content : 'url:' + addurl, lock : true, width : width, //zIndex:1990, height : height, parent : windowapi, title : title, opacity : 0.3, cache : false, /* ok : function() {//去掉确定的方法 iframe = this.iframe.contentWindow; saveObj(); return false; }, */ button:[{//设置按钮 name: '保存', callback: function(){ iframe = this.iframe.contentWindow;//获取弹出层的iframe saveParam();//自定义保存数据方法 return false;//阻止页面关闭(默认为true不关闭) } },{//设置按钮 name: '关闭', callback: function(){ iframe = this.iframe.contentWindow;//获取弹出层的iframe closeButton(); //调用关闭弹出框窗口方法 return false; //阻止页面关闭(默认为true不关闭) } }], // okVal : oktext, //去掉确定按钮 cancelVal : canceltext, cancel : false /*为true等价于function(){}*/ }).zindex(); } //--author:wjl---------date:20170206---------for:弹出bug修改,设置了文本函数 } //点击关闭事件 function closeButton(){ frameElement.api.opener.location.reload();//关闭重新加载一次 //frameElement.api.close(); //关闭弹出窗口 } function saveParam(){ alert(111) } </script>
相关文章推荐
- Jeecg中Dialog弹出新页面自定义按钮
- 源码推荐(0718B):按钮菜单点击按钮动画弹出扇形菜单,自定义视频播放器封装AVPlayer
- asp.net中点击某个按钮时打开自定义的弹出页面
- 自定义按钮 点击弹出PopupWindow窗口
- jeecg 弹出框 点击按钮回调父页面 返回值
- Qt 主窗口点击按钮 弹出另一个自定义窗口
- Salesforce -- 自定义按钮弹出VisualForce页面,页面关闭后刷新原页面
- 自定义ViewGroup实现点击按钮弹出多个按钮
- jQuery的magnificPopup插件如何通过自定义按钮关闭弹出窗口
- 自定义弹出框 鼠标滑过按钮有特效
- 点击按钮弹出可自定义小弹框即实现模态窗口
- jeecg最近用到弹出窗体按钮文本修改的问题
- 安卓开发学习之013 EditText应用详解(样式、背景、光标、错误提示、自定义带删除按钮、无弹出菜单)
- 点击自定义按钮弹出百度商桥对话框
- 一个简单自定义屏幕,并调用word和excel的样例程序 1000弹出选择按钮
- 自定义Dialog用于电话咨询,具有从底部弹出效果,点击按钮改变颜色
- moo弹出框 改进版 css外置 背景用图片 大小任意缩放 圆角 插入任意内容 自定义按钮 回车空格esc支持 滚动支持 动画开关
- jeecg如何在一个页面使用按钮选择弹出选择框
- 自定义的弹出窗口/无菜单栏最大化窗口代码/
- android自定义menu,PopUpWindow弹出菜单