將下面的代碼儲存為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即可