qq_65119259 2015-07-15 02:08 采纳率: 0%
浏览 1951

弹框的X不起作用 点击无反应

JRF.popupWindow = function(i) {
    var E = "";
    var s = "_blank";
    var y = "500";
    var u = "300";
    var t = "auto";
    var a = false;
    var g = "0.5";
    var c = true;
    var C = 0;
    var A = 0;
    var F = true;
    var D = "";
    var o = 70;
    var l = 10;
    var r = true;
    var d = false;
    var h = JRF.top.document.documentElement.clientWidth;
    var m = JRF.top.document.documentElement.clientHeight;
    if (! ($.browser.msie == true)) {
        h = JRF.top.document.body.clientWidth
    }
    var k = (h - y - l) / 2;
    var w = (m - u - o) / 2;
    var q = 24;
    var z = 5;
    var j = "";
    var B = {};
    B = $.extend({},
    B, i);
    if (B.autoPopup != null) {
        a = B.autoPopup
    }
    if (B.title != null) {
        E = B.title
    }
    if (B.frameSrcUrl != null) {
        s = B.frameSrcUrl
    }
    if (B.autoPopup != null) {
        s += "&act=close"
    }
    if (B.bannerDisplay != null) {
        F = B.bannerDisplay
    }
    if (B.framePadding != null) {
        r = B.framePadding
    }
    if (B.bgClose != null) {
        d = B.bgClose
    }
    if (!F) {
        F = "display:none;";
        D = "background:none;";
        o = 0;
        l = 0
    } else {
        F = ""
    }
    if (!r) {
        D += "padding:0;";
        o = 0;
        l = 0;
        q = 0;
        z = 0;
        j = 'allowtransparency="true"'
    }
    if (B.width != null) {
        y = B.width
    }
    if (y > h - l) {
        y = h - l
    }
    if (B.height != null) {
        u = B.height
    }
    if (u > (m - o)) {
        u = m - o
    }
    if (B.frameScrolling != null) {
        t = B.frameScrolling
    }
    if (B.opacity != null) {
        g = B.opacity
    }
    if (B.leftMar != null) {
        k = B.leftMar
    } else {
        k = (h - y - l) / 2
    }
    if (B.topMar != null) {
        w = B.topMar
    } else {
        w = (m - u - o) / 2
    }
    if (B.displayBg != null) {
        c = B.displayBg
    }
    if (B.offsetX != null) {
        C = B.offsetX
    }
    if (B.offsetY != null) {
        A = B.offsetY
    }
    var v = parseInt(Math.random() * 10000);
    var f = "<iframe " + j + ' id="popupWindowIframe' + v + '" class="popupWindowIframe" src="" frameborder="0" scrolling="' + t + '" style="width:' + (y - q + 12) + "px; height:" + (u - z) + 'px;"></iframe>';
    var x = true;
    if (B.divId != null) {
        x = false;
        f = $(B.divId).html()
    }
    if (B.divContent != null) {
        x = false;
        f = B.divContent
    }
    if (c) {
        JRF.bg(v, g)
    }
    var p = "";
    var b = JRF.top.$("body").scrollTop();
    if (b == 0) {
        b = JRF.top.$("html").scrollTop()
    }
    p += '<div id="popupWindow' + v + '" class="formDialog" style="width:' + y + "px; left:" + (k - C) + "px; top:" + (w - A + b) + 'px;">' + '<div class="formTL" id="dragHandle_' + v + '" style=\'' + F + '\'><div class="formTR"><div class="formTC"><h3>' + E + '</h3></div></div></div><div class="formBL" style=\'' + D + "'><div class=\"formBR\" style='" + D + '\'><div class="formBC" id="formBC' + v + '" style="height:auto;' + D + '"><div class="formMSG" style="position: relative;">' + f + "</div><div class='formBtns'><div class='formt_bk'></div></div></div><div id=\"waitingP" + v + '" class="waitingP" style="height:auto;"></div></div></div><div class="formBtl"><div class="formBtr"><div class="formBtm"></div></div></div><a href="javascript:;" class="formX ' + (F ? "formX_old": "") + "\" hidefocus='true'></a></div>";
    var n;
    if (JRF.isIE6()) {
        n = JRF.top.$(p).appendTo("body");
    } else {
        n = JRF.win.$(p).appendTo(JRF.top.document.body);
        n.show();
    }
    if ($.browser.msie && $.browser.version == 6) {
        $("#fixFlashIframe" + v).attr("height", ($("#popupWindow" + v).height()) + "px")
    }
    if (x) {
        JRF.dom.find("#waitingP" + v).height(JRF.dom.find("#formBC" + v).height());
        JRF.dom.find("#waitingP" + v).width(JRF.dom.find("#formBC" + v).width())
    } else {
        JRF.dom.find("#waitingP" + v).hide()
    }
    if (B.divInit != null) {
        B.divInit(v)
    }

    JRF.dom.find("#popupWindow" + v).ready(function() {

        if (x) {

            JRF.dom.find("#popupWindowIframe" + v).attr("src", JRF.addUrlParams(s, "popupID=" + v)).load(function() {
                JRF.dom.find("#waitingP" + v).css("display", "none")
            })
        }
        Drag.init(JRF.top.document.getElementById("dragHandle_" + v), JRF.top.document.getElementById("popupWindow" + v));
        if (!JRF.isNull(B.close)) {
            n.find(".formX").click(B.close);
        } else {
            n.find(".formX").bind("click",
            function() {
                JRF.closePopupWindow(v);
                return false
            });
        }
        n.find(".formTL").disableSelection();
        if (B.bgClose) {
            JRF.dom.find("#popupBg" + v).bind("click",
            function() {
                JRF.closePopupWindow(v);
                return false
            })
        }
        JRF.dom.find('body input:first').focus();
    });
    if (JRF.isNull(top._popupOptions)) {
        top._popupOptions = {}
    }
    if (JRF.isNull(top._popupOptions["popup" + v])) {
        top._popupOptions["popup" + v] = {}
    }
    if (!JRF.isNull(i.callArgs)) {
        top._popupOptions["popup" + v].callArgs = i.callArgs
    }
    top._popupOptions["popup" + v].options = i;
    top._popupOptions["popup" + v].change = false;
    return v
};
JRF.setPopupWindowChange = function(b, a) {
    if (JRF.isNull(JRF.top._popupOptions)) {
        return
    }
    if (JRF.isNull(JRF.top._popupOptions["popup" + b])) {
        return
    }
    JRF.top._popupOptions["popup" + b].change = a
};
JRF.closePopupWindow = function(g, d) {
    if (g) {
        try {
            if (JRF.isNull(top._popupOptions["popup" + g])) {
                return;
            }
            var c = top._popupOptions["popup" + g];
            if (c.refresh) {
                top.location.reload();
            }
            JRF.win.JRF.removeAllIng(false);
            var b = c.options;
            if (!JRF.isNull(b.closeFunc)) {
                if (d) {
                    b.closeFunc(d);
                } else {
                    b.closeFunc(top._popupOptions["popup" + g].closeArgs);
                }
            }
            top._popupOptions["pupup" + g] = {};
            JRF.closePopupWindow_Internal(g);
        } catch(f) {}
    } else {
        JRF.removeBg();
        JRF.dom.find(".formDialog").remove()
    }
};
  • 写回答

2条回答 默认 最新

  • threenewbee 2015-07-15 03:30
    关注

    这代码怎么看怎么像混淆过的。变量名都处理了。建议调试下或者干脆换一个别的。

    评论

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题