一段程序代码是什么意思

来源:百度知道 编辑:UC知道 时间:2024/06/19 16:02:37
list_forum')!=-1||P.indexOf('/theme/info/info')!= -1||P.indexOf('/promo/co_header.php')!= -1||P.indexOf('fast_buy.htm')!= -1||P.indexOf('/add_collection.htm')!= -1){var R=escape(document.referrer);document.write(' ')}})();

先将它展开:
list_forum')!=-1
||P.indexOf('/theme/info/info')!= -1
||P.indexOf('/promo/co_header.php')!= -1
||P.indexOf('fast_buy.htm')!= -1
||P.indexOf('/add_collection.htm')!= -1){
var R=escape(document.referrer);
document.write(' ');
}
})();
这代码不完全啊,前面部分是个条件语句,好像是判断一个路径是否包含上面中的一个,后面的})();说明前面定义了一个闭包。