zoukankan      html  css  js  c++  java
  • 同名窗口不能重新打开

    var globalWin;//全局变量,表示打开的那个窗口对象

    globalsubmitForm.LaunchWindow = function (sHref, winName, width, height, top, left) {
    var windowSettings = 'status=yes,menubar=no,scrollbars=yes,toolbar=no,resizable=yes,';
    if (width == 0 && height == 0) {
    windowSettings += 'width=' + (screen.width - 12);
    windowSettings += ', height=' + (screen.height - 100);
    windowSettings += ', top=0, left=0';
    }
    else {
    windowSettings += 'width=' + width;
    windowSettings += ', height=' + height;
    windowSettings += ', top=' + top;
    windowSettings += ', left=' + left;
    }
    if (globalWin == null || globalWin.closed) {
    globalWin = window.open(sHref, winName, windowSettings);
    globalWin.focus();
    }
    else {
    alert('同名窗口已经打开,请先关闭打开的窗口');
    }
    }

  • 相关阅读:
    Ztree-
    富文本编辑器Ueditor
    通知 弹框
    ResultEntity
    echart
    定时器,定时发邮件JavaMail
    重定向传值
    图片验证码
    异步json发送put或者delete
    异步时间格式转换插件
  • 原文地址:https://www.cnblogs.com/LGDD/p/7746396.html
Copyright © 2011-2022 走看看