2006年09月17日

側邊加入迷你水族箱

忘了是從何處知悉這個水族箱的網站了,今天改寫了一下程式,依進入首頁時的秒數來顯示不同的水族 箱,總共有十種不同的水族箱或魚群。雖然改寫了程式,但仍保留原有的連結,應該是沒有侵犯到該網站的智慧財產權吧 :-)

範例請繼續閱讀...


 




程式在後,請將全形的小於換成半形的小於後,加入自由欄位。
<script>
var d = new Date();
var s = d.getSeconds();
var aFishes = ["mini_neon","mini_neon2","mini_neon3","mini_neon4",
"mini_platinum","mini_discus","mini_discus2",
"mini_clown","mini_clown2","mini_clown3"];
var iType= (s % (aFishes.length));
thefile=aFishes[iType];
document.write(thefile);
if (typeof(ma_BackgroundColor) =="undefined") ma_BackgroundColor = "#444444";
if (typeof(ma_FishNum) =="undefined") ma_FishNum = "2";
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-director"]) ? navigator.mimeTypes["application/x-director"].enabledPlugin : 0;
if( plugin ){
var words = navigator.plugins["Shockwave for Director"].description.split(" ");
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words[i])))
continue;
var swPluginVersion =parseFloat(words[i]);
}
var swCanPlay = swPluginVersion >= 8.5;
} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0 )) {
var tVersionString = "";
document.write('<SCRIPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
document.write('set tSWControl = CreateObject("SWCtl.SWCtl") \n');
document.write('if IsObject(tSWControl) then \n');
document.write('tVersionString = tSWControl.ShockwaveVersion("") \n');
document.write('end if');
document.write('</SCRIPT\> \n');

if (tVersionString != "") {
tVersionIndex = tVersionString.indexOf(".")
var tMajorVersionString = tVersionString.substring(tVersionIndex-2, tVersionIndex);
var tMinorVersionString = tVersionString.substring(tVersionIndex+1, tVersionIndex+2);
if (parseInt(tMajorVersionString) > 8) {
swCanPlay = 1;
}else if (parseInt(tMajorVersionString) == 8) {
if (tMinorVersion > 0) {
if (parseInt(tMinorVersionString) >= 5) {
swCanPlay = 1;
}
} else {
swCanPlay = 1;
}
}
}
}
if(swCanPlay){
document.write('<object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000"');
document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,0,0"');
document.write(' ID=miniaqua width=140 height=130><param name=src value="http://m-aqua.com/'+thefile+'.dcr">');
document.write("<param name=swRemote value=\"swSaveEnabled='false' swVolume='false' swRestart='false' swPausePlay='false' swFastForward='false' swContextMenu='true' \">");
document.write('<param name=swStretchStyle value=meet><PARAM NAME=bgColor VALUE='+ma_BackgroundColor+'><PARAM NAME=sw1 VALUE='+ma_BackgroundColor+'><PARAM NAME=sw2 VALUE='+ma_FishNum+'>');
document.write('<PARAM NAME=logo VALUE=FALSE><PARAM NAME=swStretchHAlign VALUE=Center><PARAM NAME=swStretchVAlign VALUE=Center>');
document.write("<embed src=\"http://m-aqua.com/"+thefile+".dcr\" bgColor="+ma_BackgroundColor+" sw1="+ma_BackgroundColor+" sw2="+ma_FishNum+" logo=FALSE swStretchHAlign=Center swStretchVAlign=Center width=140 height=130 swRemote=\"swSaveEnabled='false' swVolume='false' swRestart='false' swPausePlay='false' swFastForward='false' swContextMenu='true' \" swStretchStyle=meet type=\"application/x-director\" pluginspage=\"http://www.macromedia.com/shockwave/download/\"> </embed></object>");
}else{
document.write('<img src="http://m-aqua.com/img/noplugin4.gif" alt="" width="140" height="130" border="0" usemap="#miniaquaMap3">');
document.write('<map name="miniaquaMap3"><area shape="rect" coords="7,86,127,101" href="http://www.macromedia.com/jp/shockwave/download/index.cgi?Lang=Japanese&P1_Prod_Version=Shockwave" target="_blank">');
document.write('<area shape="rect" coords="52,42,114,58" href="http://m-aqua.com/miniaqua.html" target="_blank"><area shape="rect" coords="0,102,140,130" href="http://www.accesstrade.net/at/c.html?rk=01000w7n000y1z" target="_blank"></map>');
}
</script>

##

Posted by emisjerry at 樂多Roodo! │20:13 │回應(3)引用(1)Blog工具箱
樂多分類:網路/3C 共同主題:讓Blog更有自己的風格 工具:編輯本文
Ads by Roodo! 

引用URL

http://cgi.blog.roodo.com/trackback/2159902
引用列表:
今天在簡睿隨筆 《科技篇》的「側邊加入迷你水族箱」文章
迷你水族箱【瓶水相逢 - CHHuang】 at 2006年09月18日 14:52
回應文章
Palacan!部落格聯播 http://www.palacan.com

我們是全國最大的部落格聯播網站,聯播是指透過rss feed的串連方式,讓大家能夠多一個匯集彼此部落格文章摘要訊息的機會,藉此提高彼此的網路能見度。如果您有興趣,可以上我們網站看看,我們的網址在:

http://www.palacan.com
Posted by palacan at 2006年09月19日 08:34
Hi there!
My first post at this great blog!
I wanna show u my dayly updated blog: http://giantblg.cn/whole-ass-amateur.html >Whole Ass Amateur
P.S. if you don't want to see this message please write me to no.ads08@gmail.com with subject "NO ADS" and URL of your forum
Thank you for cooperation!
Posted by DominikKoehleru at 2008年11月18日 22:47
Posted by peladeplibe at 2009年01月31日 14:22