首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

js 生手求解

2013-04-05 
js 新手求解_cookie.setCookie(ts_uid, !0) 这句中的 !0是什么意思 这个参数是怎么来的。完整Jsrun: func

js 新手求解
_cookie.setCookie("ts_uid", !0) 这句中的 !0是什么意思 这个参数是怎么来的。



完整Js


run: function() {
            var e, t, n;
            e = (new Date).getTime(),
            _cookie.init(),
            this.url.push(this.getDomainInfo()),
            this.coverCookie(),
            _cookie.setCookie("ssid"),
            _cookie.save(),
            this.url.unshift("http://pingfore." + this.getCookieSetDomain(_curDomain) + "/pingd?"),
            this.url.push(this.getRefInfo(_params));
            try {
                navigator.cookieEnabled ? this.url.push("&pvid=" + _cookie.setCookie("pgv_pvid", !0)) : this.url.push("&pvid=NoCookie")
            } catch(r) {
                this.url.push("&pvid=NoCookie")
            }
            this.url.push(this.getMainEnvInfo()),
            this.url.push(this.getExtendEnvInfo()),
            _pgvVersion && (pgvGetColumn(), pgvGetTopic(), this.url.push("&column=" + Tcss.column + "&subject=" + Tcss.subject), tracert()),
            this.url.push("&vs=" + _ver),
            _cookie.setCookie("ts_uid", !0),
            t = (new Date).getTime(),
            _ext.push("tm=" + (t - e)),
            _ch && _ext.push("ch=" + _ch),
            _params.extParam ? n = _params.extParam + "|": n = "",
            this.url.push("&ext=" + escape(n + _ext.join(";"))),
            this.url.push("&hurlcn=" + escape(_hurlcn.join(";"))),
            this.url.push("&rand=" + Math.round(Math.random() * 1e5)),
            typeof _speedMark == "undefined" ? this.url.push("&reserved1=-1") : this.url.push("&reserved1=" + (new Date - _speedMark));
            if (_params.pgUserType || _params.reserved2) {
                var i = _params.pgUserType || _params.reserved2;


                _tt.push("pu=" + escape(i.substring(0, 256)))
            }
            var s = this.getSud();
            s && _tt.push("su=" + escape(s.substring(0, 256))),
            this.url.push("&tt=" + escape(_tt.join(";"))),
            this.sendInfo(this.url.join(""));
            if (_crossDomain == 1) {
                var o = this.getParameter("tcss_rp_dm", _d.URL);
                if (o != Tcss.dm) {
                    var u = this.url.join("").replace(/\?dm=(.*?)\&/, "?dm=" + o + "&");
                    this.sendInfo(u)
                }
            }
            _params.hot && (document.attachEvent ? document.attachEvent("onclick",
            function(e) {
                pgvWatchClick(e)
            }) : document.addEventListener("click",
            function(e) {
                pgvWatchClick(e)
            },
            !1)),
            _params.repeatApplay && _params.repeatApplay == "true" && typeof _rep != "undefined" && (_rep = 1),
            this.loadScript(_speedTestUrl)
        },


[解决办法]
!0====true
[解决办法]
0== false 
!0 == true
自己alter一下就知道了。
[解决办法]
!0就是true的意思

!就是非
0一般情况下转换成布尔型是false

所以!0就是非false,可不就是true了

跟参数没啥关系。
[解决办法]
写死了是true

热点排行