ลำดับตอนที่ #49
คืนค่าการตั้งค่าทั้งหมด
คุณแน่ใจว่าต้องการคืนค่าการตั้งค่าทั้งหมด ?
ลำดับตอนที่ #49 : หิมะตก
<SCRIPT LANGUAGE="JavaScrpt1.2">
<!-- Orgnal: Altan (snow@altan.hr) -->
<!-- Web Ste: http://www.altan.hr/snow -->
<!-- Ths scrpt and many more are avalable free onlne at -->
<!-- The JavaScrpt Source!! http://javascrpt.nternet.com -->
<!-- Begn
var no = 25; // snow number
var speed = 10; // smaller number moves the snow faster
var snowflake = "snow.gf";
var ns4up = (document.layers) ? 1 : 0; // browser snffer
var e4up = (document.all) ? 1 : 0;
var dx, xp, yp; // coordnate and poston varables
var am, stx, sty; // ampltude and step varables
var , doc_wdth = 800, doc_heght = 600;
f (ns4up) {
doc_wdth = self.nnerWdth;
doc_heght = self.nnerHeght;
} else f (e4up) {
doc_wdth = document.body.clentWdth;
doc_heght = document.body.clentHeght;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
for ( = 0; < no; ++ ) {
dx = 0; // set coordnate varables
xp = Math.random()*(doc_wdth-50); // set poston varables
yp = Math.random()*doc_heght;
am = Math.random()*20; // set ampltude varables
stx = 0.02 + Math.random()/10; // set step varables
sty = 0.7 + Math.random(); // set step varables
f (ns4up) { // set layers
f ( == 0) {
document.wrte("<layer name=\"dot"+ +"\" left=\"15\" ");
document.wrte("top=\"15\" vsblty=\"show\"><mg src=\"");
document.wrte(snowflake + "\" border=\"0\"></layer>");
} else {
document.wrte("<layer name=\"dot"+ +"\" left=\"15\" ");
document.wrte("top=\"15\" vsblty=\"show\"><mg src=\"");
document.wrte(snowflake + "\" border=\"0\"></layer>");
}
} else f (e4up) {
f ( == 0) {
document.wrte("<dv d=\"dot"+ +"\" style=\"POSITION: ");
document.wrte("absolute; Z-INDEX: "+ +"; VISIBILITY: ");
document.wrte("vsble; TOP: 15px; LEFT: 15px;\"><mg src=\"");
document.wrte(snowflake + "\" border=\"0\"></dv>");
} else {
document.wrte("<dv d=\"dot"+ +"\" style=\"POSITION: ");
document.wrte("absolute; Z-INDEX: "+ +"; VISIBILITY: ");
document.wrte("vsble; TOP: 15px; LEFT: 15px;\"><mg src=\"");
document.wrte(snowflake + "\" border=\"0\"></dv>");
}
}
}
functon snowNS() { // Netscape man anmaton functon
for ( = 0; < no; ++ ) { // terate for every dot
yp += sty;
f (yp > doc_heght-50) {
xp = Math.random()*(doc_wdth-am-30);
yp = 0;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
doc_wdth = self.nnerWdth;
doc_heght = self.nnerHeght;
}
dx += stx;
document.layers"dot"+.top = yp;
document.layers"dot"+.left = xp + am*Math.sn(dx);
}
setTmeout("snowNS()", speed);
}
functon snowIE() { // IE man anmaton functon
for ( = 0; < no; ++ ) { // terate for every dot
yp += sty;
f (yp > doc_heght-50) {
xp = Math.random()*(doc_wdth-am-30);
yp = 0;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
doc_wdth = document.body.clentWdth;
doc_heght = document.body.clentHeght;
}
dx += stx;
document.all"dot"+.style.pxelTop = yp;
document.all"dot"+.style.pxelLeft = xp + am*Math.sn(dx);
}
setTmeout("snowIE()", speed);
}
f (ns4up) {
snowNS();
} else f (e4up) {
snowIE();
}
// End -->
</scrpt>
<!-- Orgnal: Altan (snow@altan.hr) -->
<!-- Web Ste: http://www.altan.hr/snow -->
<!-- Ths scrpt and many more are avalable free onlne at -->
<!-- The JavaScrpt Source!! http://javascrpt.nternet.com -->
<!-- Begn
var no = 25; // snow number
var speed = 10; // smaller number moves the snow faster
var snowflake = "snow.gf";
var ns4up = (document.layers) ? 1 : 0; // browser snffer
var e4up = (document.all) ? 1 : 0;
var dx, xp, yp; // coordnate and poston varables
var am, stx, sty; // ampltude and step varables
var , doc_wdth = 800, doc_heght = 600;
f (ns4up) {
doc_wdth = self.nnerWdth;
doc_heght = self.nnerHeght;
} else f (e4up) {
doc_wdth = document.body.clentWdth;
doc_heght = document.body.clentHeght;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
for ( = 0; < no; ++ ) {
dx = 0; // set coordnate varables
xp = Math.random()*(doc_wdth-50); // set poston varables
yp = Math.random()*doc_heght;
am = Math.random()*20; // set ampltude varables
stx = 0.02 + Math.random()/10; // set step varables
sty = 0.7 + Math.random(); // set step varables
f (ns4up) { // set layers
f ( == 0) {
document.wrte("<layer name=\"dot"+ +"\" left=\"15\" ");
document.wrte("top=\"15\" vsblty=\"show\"><mg src=\"");
document.wrte(snowflake + "\" border=\"0\"></layer>");
} else {
document.wrte("<layer name=\"dot"+ +"\" left=\"15\" ");
document.wrte("top=\"15\" vsblty=\"show\"><mg src=\"");
document.wrte(snowflake + "\" border=\"0\"></layer>");
}
} else f (e4up) {
f ( == 0) {
document.wrte("<dv d=\"dot"+ +"\" style=\"POSITION: ");
document.wrte("absolute; Z-INDEX: "+ +"; VISIBILITY: ");
document.wrte("vsble; TOP: 15px; LEFT: 15px;\"><mg src=\"");
document.wrte(snowflake + "\" border=\"0\"></dv>");
} else {
document.wrte("<dv d=\"dot"+ +"\" style=\"POSITION: ");
document.wrte("absolute; Z-INDEX: "+ +"; VISIBILITY: ");
document.wrte("vsble; TOP: 15px; LEFT: 15px;\"><mg src=\"");
document.wrte(snowflake + "\" border=\"0\"></dv>");
}
}
}
functon snowNS() { // Netscape man anmaton functon
for ( = 0; < no; ++ ) { // terate for every dot
yp += sty;
f (yp > doc_heght-50) {
xp = Math.random()*(doc_wdth-am-30);
yp = 0;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
doc_wdth = self.nnerWdth;
doc_heght = self.nnerHeght;
}
dx += stx;
document.layers"dot"+.top = yp;
document.layers"dot"+.left = xp + am*Math.sn(dx);
}
setTmeout("snowNS()", speed);
}
functon snowIE() { // IE man anmaton functon
for ( = 0; < no; ++ ) { // terate for every dot
yp += sty;
f (yp > doc_heght-50) {
xp = Math.random()*(doc_wdth-am-30);
yp = 0;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
doc_wdth = document.body.clentWdth;
doc_heght = document.body.clentHeght;
}
dx += stx;
document.all"dot"+.style.pxelTop = yp;
document.all"dot"+.style.pxelLeft = xp + am*Math.sn(dx);
}
setTmeout("snowIE()", speed);
}
f (ns4up) {
snowNS();
} else f (e4up) {
snowIE();
}
// End -->
</scrpt>
เก็บเข้าคอลเล็กชัน
ความคิดเห็น