window.h在javascript中的含义是什么?

Dr.*_*ana 0 javascript jquery

可能是一个非常简单的问题

我一直在寻找,但我找不到window.h的意思?只有一些关于C++但不关于javascript的文章.

view: {
    fc: "",
    init: function() {
        var iframe = $("iframe")[0];
        var focused = true;
        var unfocusedTimeStart = null;
        var unfocusedTime = null;
        var loaded = false;
        var prevent_bust = 0;
        var done = false;
        window.onbeforeunload = function() {
            prevent_bust++;
        };
        setInterval(function() {
            if (prevent_bust > 0 && !done) {
                prevent_bust -= 2;
            }
        }, 1);
        var mySwfStore = new SwfStore({
            namespace: "BTCClicks",
            swf_url: "/js/storage.swf",
            onready: function() {
                var fcookie = mySwfStore.get("fcookie");
                var randomstring = md5(randomstring);
                if (fcookie == null) {
                    mySwfStore.set("fcookie", randomstring);
                }
                fcookie = mySwfStore.get("fcookie");
                if (fcookie != null) {
                    BTCClicks.view.fc = fcookie;
                }
            },
            onerror: function() {}
        });
        $("#viewFrame").load(function() {
            if (!loaded) {
                $.post("/ajax/vrequest", {
                    ad: window.h,
                    fc: BTCClicks.view.fc
                }).done(function() {
                    startTimer();
                });
                loaded = true;
            }
        });
Run Code Online (Sandbox Code Playgroud)

有人可以解释这意味着什么吗?

TGH*_*TGH 6

If指的是h在全局(窗口)范围内命名的变量

无论何时在JavaScript中创建全局变量,您都可以通过名称或引用它来引用它 window.[variableName]

在这种情况下,您可以这样做

ad: window.h
Run Code Online (Sandbox Code Playgroud)

要么

ad: h
Run Code Online (Sandbox Code Playgroud)

只要没有另一个名为h的局部变量