利用javascript实现一些常用软件的下载导航

(编辑:jimmy 日期: 2024/10/10 浏览:2)

将下面的代码保存为jb51.html
复制代码 代码如下:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>javascript 播放器下载导航测试</title>
</head>
<body>
<div id="divcontent" style="text-align:left">好像没找到你要的东西哦:)</div>
<script language="javascript">
function $(id){return document.getElementById(id);}
var name= location.search.substring(1,location.search.length);
var lowername= name.toLowerCase();
var fArr=["scast","cplayer","ants","aplayer","pps","splayer","tvu","tplayer","ppl","pplayer","usee","uplayer","kplayer","pplayer2","uplayer2008"];
for(var i=0;i<fArr.length;i++){
if (lowername==fArr[i]){
var nName=fArr[i].replace('scast','cplayer');
nName= nName.replace('ants','aplayer');
nName= nName.replace('pps','splayer');
nName= nName.replace('tvu','tplayer');
nName= nName.replace('usee','uplayer');
$('divcontent').innerHTML= "您需要下载的解码器文件是:<a href='http://down1.jb51.net/chajian/"+nName+".exe'>"+nName+'.exe</a><br>(下载后运行一下,然后再点击“流星网络电视”里的节目就可以收看了!)';
}
}
</script>
</body>
</html>

其实的时实际软件下载地址
http://down1.jb51.net/chajian/scast.exe
http://down1.jb51.net/chajian/cplayer.exe
http://down1.jb51.net/chajian/ants.exe
http://down1.jb51.net/chajian/aplayer.exe
http://down1.jb51.net/chajian/tvu.exe
http://down1.jb51.net/chajian/tplayer.exe
http://down1.jb51.net/chajian/ppl.exe
http://down1.jb51.net/chajian/pplayer.exe
http://down1.jb51.net/chajian/usee.exe
http://down1.jb51.net/chajian/uplayer.exe
http://down1.jb51.net/chajian/kplayer.exe
http://down1.jb51.net/chajian/uplayer2008.exe
具体的页面参数调用方式
jb51.html?kpalyer即可

一句话新闻
高通与谷歌联手!首款骁龙PC优化Chrome浏览器发布
高通和谷歌日前宣布,推出首次面向搭载骁龙的Windows PC的优化版Chrome浏览器。
在对骁龙X Elite参考设计的初步测试中,全新的Chrome浏览器在Speedometer 2.1基准测试中实现了显著的性能提升。
预计在2024年年中之前,搭载骁龙X Elite计算平台的PC将面世。该浏览器的提前问世,有助于骁龙PC问世就获得满血表现。
谷歌高级副总裁Hiroshi Lockheimer表示,此次与高通的合作将有助于确保Chrome用户在当前ARM兼容的PC上获得最佳的浏览体验。