js中,(function (d) {
var ta=d.createElement("script");ta.type="text/javascript";ta.async=true;ta.id="tb-beacon";
ta.setAttribute("exparams","category=&userid=&tid=9a2828e502c2093120adab1d86b62f5f&channel=109&");
ta.src=("https:"==d.location.protocol?"https://s":"http://a")+".tbcdn.cn/s/atp.js";
d.getElementsByTagName("head")[0].appendChild(ta);
})(document);
怎么解释?
var ta=d.createElement("script");ta.type="text/javascript";ta.async=true;ta.id="tb-beacon";
ta.setAttribute("exparams","category=&userid=&tid=9a2828e502c2093120adab1d86b62f5f&channel=109&");
ta.src=("https:"==d.location.protocol?"https://s":"http://a")+".tbcdn.cn/s/atp.js";
d.getElementsByTagName("head")[0].appendChild(ta);
})(document);
怎么解释?
var priObj = (function (name) {
this.priName = name;
return {
getName: function () {
return priName;
},
setName: function (nname) {
priName = nname;
}
};
})("wang");