[ Tin nhắn mới · Thành viên · Quy tắc diễn đàn · Tìm kiếm · RSS]
THỐNG KÊ DIỄN ĐÀN
BÀI VIẾT MỚICHỦ ĐỀ SÔI ĐỘNGTHÀNH VIÊN TÍCH CỰCTHÀNH VIÊN MỚI
  • Chồng Nhâm Thâ... (1)
  • Bộ sách về tử ... (1)
  • Thuốc chữa bện... (1)
  • Bệnh nhiệt miệ... (0)
  • Tạo màng ngăn ... (0)
  • Tổng Hợp về YA... (13)
  • Tăng font chữ ... (13)
  • Tử vi năm Nhâm... (11)
  • Phong thủy cho... (10)
  • Thái cực quyền... (8)
  • TieuBao
  • kcdl
  • havanchan55
  • minzjkute
  • 12a3
  • huyenntn17fsoft
  • trininh0610
  • linhphuongcva
  • xedayinoxaht
  • matkinhauviet11
    • Page 1 of 1
    • 1
    DIỄN ĐÀN_VNTAMTAY » THƯ VIỆN WEBSITE » CODE CHO WEBSITE - FORUM » Tạo Một Trận Sao Rơi Bằng JavaScript (Tạo Một Trận Sao Rơi Bằng JavaScript)
    Tạo Một Trận Sao Rơi Bằng JavaScript
    TieuBaoNgày: Thứ 7, 09-Mar-13, 22:33:51 | Bài viết # 1


    Nhóm: Administrator
    Số bài viết: 3090
    Khen thưởng: 3
    Được cảm ơn: 10001
    Trạng thái: Offline
    Quote
    <html> <head> <title>Hieu Ung JavaScript Tuyet Dang Roi - Le Hu'ng Homepage</title> </head> <body> <center> <script LANGUAGE="JavaScript1.2"> <!-- Begin var no = 25; // Số tuyết var speed = 10; // Số càng nhỏ tuyết di chuyển(rơi) càng nhanh var snowflake = "http://www.vn-zoom.com/images/idcs.gif"; // Nơi đây chèn hình bông tuyết var ns4up = (document.layers) ? 1 : 0; // Bộ duyệt tìm nạp vào var ie4up = (document.all) ? 1 : 0; var dx, xp, yp; // tọa độ và những vị trí thay đổi var am, stx, sty; // Độ rộng và những bước thay đổi var i, doc_width = 800, doc_height = 600; 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[i] = 0; // những biến đổi toạ độ tập hợp xp[i] = Math.random()*(doc_width-50); // tập hợp những thay đổi vị trí yp[i] = Math.random()*doc_height; am[i] = Math.random()*20; // tập hợp những thay đổi độ rộng stx[i] = 0.02 + Math.random()/10; // tập hợp những thay đổi bước sty[i] = 0.7 + Math.random(); //tập hợp những thay đổi bước if (ns4up) { // những lớp tập hợp if (i == 0) { document.write("<layer name=\"dot"+ i +"\" left=\"15\" "); document.write("top=\"15\" visibility=\"show\"><img src=\""); document.write(snowflake + "\" border=\"0\"></layer>"); } else { document.write("<layer name=\"dot"+ i +"\" left=\"15\" "); document.write("top=\"15\" visibility=\"show\"><img src=\""); document.write(snowflake + "\" border=\"0\"></layer>"); } } else if (ie4up) { if (i == 0) { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: "); document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: "); document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\""); document.write(snowflake + "\" border=\"0\"></div>"); } else { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: "); document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: "); document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\""); document.write(snowflake + "\" border=\"0\"></div>"); } } } function snowNS() { // hàm Netscape hoạt cảnh chính for (i = 0; i < no; ++ i) { // vòng lặp cho mỗi điểm yp[i] += sty[i]; if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = self.innerWidth; doc_height = self.innerHeight; } dx[i] += stx[i]; document.layers["dot"+i].top = yp[i]; document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]); } setTimeout("snowNS()", speed); } function snowIE() { // hàm IE hoạt cảnh chính for (i = 0; i < no; ++ i) { // vòng lặp cho mỗi điểm yp[i] += sty[i]; if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = document.body.clientWidth; doc_height = document.body.clientHeight; } dx[i] += stx[i]; document.all["dot"+i].style.pixelTop = yp[i]; document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]); } setTimeout("snowIE()", speed); } if (ns4up) { snowNS(); } else if (ie4up) { snowIE(); } // End --> </script> </body> </html>


    TRẺ DÙNG SỨC KHỎE KIẾM TIỀN-GIÁ DÙNG TIỀN MUA SỨC KHỎE

    NHỮNG GÌ CON NGƯỜI KHÔNG NGHĨ TỚI LẠI XẢY RA TRONG ĐỜI
     
    DIỄN ĐÀN_VNTAMTAY » THƯ VIỆN WEBSITE » CODE CHO WEBSITE - FORUM » Tạo Một Trận Sao Rơi Bằng JavaScript (Tạo Một Trận Sao Rơi Bằng JavaScript)
    • Page 1 of 1
    • 1
    Search:

    click ủng hộ vntamtay
    Chát với Tôi
    300
    Liên kết quảng cáo
    Buôn bán phụ tùng!
    Đang truy cập
    Khu đăng nhập
    Video Clip
    00:04:01

    Vietnamese Girls dress in Ao Dai- Em Trong Mắt Tôi

    • Views:
    • Total comments: 0
    • Rating: 0.0
    Tỷ giá tiền tệ