利用javascript實現一些常用軟體的下載導航_javascript技巧

來源:互聯網
上載者:User

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

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.