XD Forum Pro - 專業論壇 » 部落日誌交流 » Xanga 交流 » 有公仔散落在板面(放起website)
論壇:互動交流好去處,主打在線動漫及劇集 博客:您的私人空間,隨便上載與分享個人事物,完全免費 視頻:全國最大上載容量的視頻網站,無限制上載次數,無限制上載總量! 聯盟:提升您網站排名與流量,加入網站排行榜聯盟。

2007-7-8 03:13 扎肉瘦腿
有公仔散落在板面(放起website)

有公仔散落在板面(放起website)

[img]http://img108.exs.cx/img108/3996/fallingisamepicture2ly.jpg[/img]


[code]<SCRIPT language=JavaScript>
st=setTimeout;
change='';
var no = 10; // number of picture appear
var speed = 50; // smaller value will move more faster
var falling = "網址"; // image URL
var ns4up = (document.layers) ? 1 : 0;
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp;
var am, stx, sty;
var i, doc_width = 600, doc_height = 800;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
for (i = 0; i < no; ++ i) {
dx = 0;
xp = Math.random()*(doc_width-50);
yp = Math.random()*doc_height;
am = Math.random()*20;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
if (ns4up) {
if (i == 0) {
document.write("<layer name="dot\"+ i +"" left="20" top="10" visibility="show"><img src="" + falling + "" border="0"></layer>");
} else {
document.write("<layer name="dot"+ i +"" left="20" top="10" visibility="show"><img src="" + falling + "" border="0"></layer>");
}
} else if (ie4up) {
if (i == 0) {
document.write("<div id="dot\"+ i +"" style="POSITION: abso"+change+"lute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 10px; LEFT: 20px;"><img src="" + falling + "" border="0"></div>");
} else {
document.write("<div id="dot\"+ i +"" style="POSITION: abso"+change+"lute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 10px; LEFT: 20px;"><img src="" + falling + "" border="0"></div>");
} } }
function snowNS() {
for (i = 0; i < no; ++ i) {
yp += sty;
if (yp > doc_height-50) {
xp = Math.random()*(doc_width-am-30);
yp = 0;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx += stx;
document.layers["dot"+i].top = yp;
document.layers["dot"+i].left = xp + am*Math.sin(dx);
}
st("snowNS()", speed);
}
function snowIE() {
for (i = 0; i < no; ++ i) {
yp += sty;
if (yp > doc_height-50) {
xp = Math.random()*(doc_width-am-30);
yp = 0;
stx = 0.02 + Math.random()/10;
sty = 0.7+ Math.random();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight; //You May change to 1550 or bigger number to let the image fall until down
}
dx += stx;
document.all["dot"+i].style.pixelTop = yp;
document.all["dot"+i].style.pixelLeft = xp + am*Math.sin(dx);
}
st("snowIE()", speed);
}
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
</SCRIPT> [/code]

頁: [1]

重要聲明:本論壇是以即時上載留言的方式運作,XD Forum Pro - 專業論壇對所有留言的真實性、完整性及立場等,不負任何法律責任。而一切留言之言論只代表留言者個人意見,並非本網站之立場,用戶不應信賴內容,並應自行判斷內容之真實性。

由於本論壇受到「即時上載留言」運作方式所規限,故不能完全監察所有留言,若讀者發現有留言出現問題,例如侵害您的版權,請以電郵方式聯絡我們,並寫上貴公司或機構的相關資料(例如商業登記號及版權持有證明)以便我們查實後盡快處理有關問題。XD Forum Pro - 專業論壇有權刪除任何留言及拒絕任何人士上載留言,同時亦有不刪除留言的權利。切勿撰寫粗言穢語、誹謗、渲染色情暴力或人身攻擊的言論,敬請自律。本網站保留一切管理及法律追究之權利。

Powered by Discuz! Archiver 5.5.0  © 2001-2006 Comsenz Inc.