当前位置: 首页 > news >正文

长春站建筑自由做图网站

长春站建筑,自由做图网站,外贸机械网站建设,室内设计培训内容easyui tabs切换之前提醒保存修改的信息 当存在多个tabs,相互切换时提醒保存修改的信息#xff1a; 这里用的鼠标mousedown事件 var tabs $(#tabsId).tabs().tabs(tabs);for(var item0; itemtabs.length; item){tabs[item].panel(options).tab.unbind().bind(mousedow…easyui tabs切换之前提醒保存修改的信息 当存在多个tabs,相互切换时提醒保存修改的信息 这里用的鼠标mousedown事件 var tabs $(#tabsId).tabs().tabs(tabs);for(var item0; itemtabs.length; item){tabs[item].panel(options).tab.unbind().bind(mousedown,{index:item},function(obj){$.messager.confirm(确认保存修改信息, 是否已经保存修改的信息?, function (row) {if (row) {$(#tabsId).tabs(select, obj.data.index);}});});}例子一个tab标签页面内有定时器需要不在当前页时暂定并保存回到当前页面时继续 关闭标签或页面需要保存的情况 关闭tab相关的情况: 右键关闭所有标签tab标签上的关闭按钮tab刷新按钮tab之前切换 页面或浏览器相关的情况 页面大刷新浏览器上的刷新按钮或按F5页面切换浏览器上的标签切换页面关闭当前网站关闭浏览器关闭浏览器最小化 $(function(){// tabs默认显示主页$(#tabBox).tabs(add,{title: 主页,content: iframe src width100% height100% aligncenter frameborder0 border0/iframe,closable: false});$(#tabBox).tabs(select,0);// tab切换保存taskTime() }) function taskTime(){// 页面或浏览器相关的情况 都会执行// document.visibilityState hidden,visible// 页面切换$(document).on(visibilitychange, function(e){if($(#tabBox) $(#tabBox).length 0) {let tabs $(#tabBox).tabs(tabs);if (tabs.length 0) {if (document.visibilityState hidden) {// console.log(页面tab切换保存并暂停)$.each(tabs, function (i, n) {let title $(n).panel(options).title;pauseSave(title);})}if (document.visibilityState visible) {$.each(tabs, function (i, n) {let title $(n).panel(options).title;if(TITLESAVE title){ // tab切换时会走判断//继续getContinue(title);}})}}}});$(#tabBox).tabs({onBeforeClose: function(title){// 情况2tab标签上的关闭按钮// 关闭之前保存closeSave(title);return true;},onUpdate: function(title){// 情况3tab刷新按钮// 刷新之前保存closeSave(title);return true;},onSelect(title){// 情况4 tab之前切换// tab切换调用onSelect,获取到当前选中的title,继续计时TITLESAVE titlegetContinue(title)},onUnselect(title){// 不选中时停止计时pauseSave(title);}})// 情况1关闭所有循环保存// 关闭所有$(#closeAll).hide();$(#tabBox).tabs({onContextMenu:function(e,title){e.preventDefault();$(#closeAll).menu(show, {left: e.pageX10,top: e.pageY5});}});$(#closeAll).menu({onClick:function(item){if(item.text关闭所有){// 循环保存closeTabsAll();}else if(item.text刷新当前标签页){}}});} function closeTabsAll(){var allTabBoxs $(#tabBox).tabs(tabs);// 循环出所有的tab标签$.each(allTabBoxs,function(i,n){let title $(n).panel(options).title;closeSave(title)})var count$(#tabBox).tabs(tabs).length;for(var indexcount;index1;index--){$(#tabBox).tabs(close, index);} } // 继续 function getContinue(title){if (document.getElementById(title)) {const iframeWindow document.getElementById(title).contentWindow;if (iframeWindow.timerShow) {let timerShow iframeWindow.timerShow();if (timerShow true) {// 调用子tab中的bts继续计时方法iframeWindow.bts(0);}}} } // 暂停保存 function pauseSave(title){if (document.getElementById(title)) {const iframeWindow document.getElementById(title).contentWindow;if (iframeWindow.timerShow) {let timerShow iframeWindow.timerShow();if (timerShow true) {// 调用子tab中的bts暂停计时方法调用tab子页面的保存方法iframeWindow.bts(1);iframeWindow.saveTime();}}} } // 关闭保存 function closeSave(title){if(document.getElementById(title)) {const iframeWindow document.getElementById(title).contentWindow;// iframeWindow.timerShow 判断计时组件存在时调用保存方法// timerShow在tab子页面中保存方法saveTime也在tab子页面中if (iframeWindow.timerShow) {let timerShow iframeWindow.timerShow();if (timerShow true) {iframeWindow.saveTime();}}} }
http://www.sadfv.cn/news/380694/

相关文章:

  • 如何利用php开源系统建立php网站网络营销公司案例
  • 网站建设类行业资讯搭建平台 提供舞台
  • 包装纸箱怎么做网站怎么修复网站死链
  • 做网站前需要准备什么软件网页主要由三部分组成
  • 做网站必须要虚拟主机吗加强门户网站建设的方案
  • 哈尔滨大连工程建设信息网站教育+wordpress模板
  • 设计师建站网站毕节公司做网站
  • 做目的旅游网站的企业网站建设的成本构成
  • 一个电脑建设多个网站云南5个中风险地区
  • 成都网站建设哪家强2017国办网站建设规范
  • 成华网站制作做网站公司牛鼻子
  • 建设工程168网站创意设计活动加计扣除
  • 襄阳定制型网站开发陕西建设厅官网首页
  • wordpress 全站sslwordpress清除原图
  • 网站模板模仿富顺县规划和建设局网站
  • 德清县新巿镇城市建设网站优秀网站建设公司
  • 18末年年禁止观看网站seo优化培训多少钱
  • 广州建网站哪里比较好手机怎么制作公众号
  • 新手学做网站pdf网站建设的商品分类编码
  • 如何设计制作一般的企业网站龙港 网站建设
  • 大良网站智能推广价格山西建设行政主管部门官方网站
  • 中国铁建华南建设有限公司网站网站关键词优化原理
  • 自建网站经营者例子青羊建站报价
  • 老外做摄影网站花多少钱课程网站建设课程
  • 做网站的学校杭州洛可可设计公司
  • 网站聊天系统怎么做免费咨询心理医生 在线
  • 网站建设代理怎么做吴江高端网站建设
  • 摄影照片投稿网站红古微信网站建设
  • 网站建设明细报价表仅供参考政务网站建设规范
  • 山西钢铁建设集团有限公司网站昆网站在哪里