我有這個腳本。這決定了瀏覽器中是否安裝了Flash Player,它將瀏覽器重定向到Flash網站。如果沒有,那麼它會打開一個非Flash網站。使用Javascript來檢查是否安裝了flash播放器並重定向到neededn頁面
的代碼是在這裏:
<SCRIPT LANGUAGE="JavaScript">
<!--
if ((navigator.appName == "Microsoft Internet Explorer" &&
navigator.appVersion.indexOf("Mac") == -1 && navigator.appVersion.indexOf("3.1") == -1) ||
(navigator.plugins && navigator.plugins["Shockwave Flash"])|| navigator.plugins["Shockwave Flash 2.0"]){
window.location='flash/index.html';
}
else {
window.location='index.html';
}
-->
</SCRIPT>
我要的是在非閃光指數中以嵌入該代碼。它應該檢查是否沒有閃光燈,然後簡單地使用已打開的當前索引文件,或者如果沒有閃光燈播放器,則從Flash網站內加載索引文件。
目前,當打開index.html(非Flash)時,它會進入循環並繼續檢查Flash播放器。我可以修改window.location='index.html';
聲明否在這裏加載任何文件,只需繼續打開已打開的文件。
哦,謝謝。一個愚蠢的問題的簡單答案。我才發現。非常感謝。 – themajiks 2011-03-10 08:07:14