当前位置: 首页 > 图文教程 > 网络编程 > Javascript > 利用javascript实现一些常用软件的下载导航

Javascript
玩透弹出窗口
几个常用的日期函数
简单的脚本帮你编排JScript程序中的缩进
得到 words.js?hello,world! 参数的处理方法
如何在javascript中传值
可输入的select
IE支持的HTML元素的DISABLE属性在NETSCAPE4.76中的实现
利用xml数据岛实现多级关联下拉选择框的做法
利用Wipe等ActiveX技术,实现n(n>>2)幅图片轮换擦洗显示
Javascript技术实现真正的网上试听
JavaScript实现在线编辑表格
根据客户端的分辨率不同而重定向到不同网页的脚本
几种不刷新页面取数据的方法
web进度条
随手写的一个动态添加删除行的HTC行为组件
农历与阳历的对照
关于在页面中解决打印的几个问题
"打开,另存为,属性,打印"等14个JS代码
无提示框关闭IE窗口
实现上传(增删)多个文件的客户端写法。

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-12   浏览: 137 ::
收藏到网摘: n/a

利用javascript实现一些常用软件的下载导航,非常不错的应用,思路值得借鉴,没看过的朋友可以看下。

将下面的代码保存为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.ruanchen.com/"+nName+".exe'>"+nName+'.exe</a><br>(下载后运行一下,然后再点击“流星网络电视”里的节目就可以收看了!)';
}
}
</script>
</body>
</html>

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