promotion image of download ymail app
Promoted

請問語法...(流言版)

請問...

有許多人的板上,會有『星星』劃過...

有誰可以給我那種語法?

4 Answers

Rating
  • Anonymous
    2 decades ago
    Favorite Answer

    <SCRIPT LANGUAGE="JavaScript">

    <!-- Beginning

    var dl = 20;

    var size = 5;

    var meteorNo = 5;

    var sizeStep = 2;

    var move = true;

    var meteorRate = 150;

    var useImg = 0;

    gs9768=(document.all?3:(document.getElementById?1:(document.layers?2:0)));

    function getWindowSize() {

    if(gs9768 == 1 || gs9768 == 2) {

    win_width = self.innerWidth;

    win_height = self.innerHeight;

    }

    if (gs9768 == 3) {

    win_width = document.body.clientWidth;

    win_height = document.body.clientHeight;

    }

    }

    function getScrollPosX() {

    if (gs9768 == 1) return scrollX;

    if (gs9768 == 2) return pageXOffset;

    if (gs9768 == 3) return document.body.scrollLeft

    }

    function getScrollPosY() {

    if (gs9768 == 1) return scrollY;

    if (gs9768 == 2) return pageYOffset;

    if (gs9768 == 3) return document.body.scrollTop;

    }

    function showLayer(layerName){

    if (gs9768 == 1) document.getElementById(layerName).style.visibility = "visible";

    if (gs9768 == 2) document.layers[layerName].visibility = "show";

    if (gs9768 == 3) document.all(layerName).style.visibility = "visible";

    }

    function hideLayer(layerName){

    if (gs9768 == 1) document.getElementById(layerName).style.visibility = "hidden";

    if (gs9768 == 2) document.layers[layerName].visibility = "hide";

    if (gs9768 == 3) document.all(layerName).style.visibility = "hidden";

    }

    function moveLayerTo(layerName, x, y){

    if (gs9768 == 1) {

    document.getElementById(layerName).style.left = x;

    document.getElementById(layerName).style.top = y;

    }

    if (gs9768 == 2) {

    document.layers[layerName].left = x;

    document.layers[layerName].top = y;

    }

    if (gs9768 == 3) {

    document.all(layerName).style.pixelLeft = x;

    document.all(layerName).style.pixelTop = y;

    }

    }

    var sx = new Array(), sy = new Array(), sclW = 0, sclH = 0;

    function initMeteor() {

    if (gs9768 && meteorFlag == 0) {

    var ran = Math.random()*meteorRate;

    if (ran < 10) {

    getWindowSize();

    if (move) sclW = getScrollPosX(), sclH = getScrollPosY();

    sX = Math.floor(Math.random()*(win_width-meteorMaxSize-5)) + sclW;

    sY = Math.floor(Math.random()*(win_height-meteorMaxSize-5)) + sclH;

    eX = Math.floor(Math.random()*(win_width-meteorMaxSize-5)) + sclW;

    eY = Math.floor(Math.random()*(win_height-meteorMaxSize-5)) + sclH;

    for (var m=0; m<meteorNo; m++) {

    moveLayerTo("meteor"+m, sX, sY);

    sx[m] = sX; sy[m] = sY;

    }

    moveMeteor();

    }

    }

    setTimeout("initMeteor()", 100);

    }

    var meteorFlag = 0;

    function moveMeteor() {

    var l, xp, yp, stopflag = false;

    for (var m=0; m<meteorNo; m++) {

    if (meteorFlag >= m) {

    l = Math.abs(Math.sqrt(Math.pow((eX - sx[m]),2) + Math.pow((eY - sy[m]),2)));

    if (l > dl) {

    xp = dl / l * (eX - sx[m]) + sx[m];

    if (eX - sx[m] == 0) {

    if (sy[m] < eY) yp = sy[m] + dl;

    else yp = sy[m] - dl;

    } else yp = (sy[m] - eY) / (sx[m] - eX) * xp + sy[m] - (sy[m] - eY) / (sx[m] - eX) * sx[m];

    sx[m] = xp; sy[m] = yp;

    showLayer("meteor"+m);

    moveLayerTo("meteor"+m, sx[m], sy[m]);

    } else {

    hideLayer("meteor"+m);

    if (m == meteorNo-1) stopflag = true;

    }

    }

    }

    if (!stopflag) { meteorFlag += 1; tim = setTimeout("moveMeteor()", 10); }

    else { clearTimeout(tim); meteorFlag = 0; }

    }

    // End -->

    </script>

    <SCRIPT LANGUAGE="JavaScript">

    <!-- Beginning

    var starLay = '<SPAN id="gs" style="position:absolute; visibility:hidden;"></SPAN>';

    for (i=meteorNo-1; i>=0; i--) {

    size += sizeStep; meteorMaxSize = size;

    if (gs9768 == 1 || gs9768 == 3) {

    if (useImg == 0) starLay += '<SPAN id="meteor' + i +

    '" style="position:absolute; width:' + size + 'px; font-size:' + size +

    'px; color:#ff80c0; z-index:8; visibility:hidden;">★</SPAN>';

    }

    if (gs9768 == 2) {

    if (size == 1) size = 2;

    if (useImg == 0) starLay += '<LAYER name="meteor'+ i +

    '" z-index="10" visibility="hide"><FONT color="#ff80c0" style="font-size:'

    + size + 'px;">★</FONT></LAYER>';

    }

    }

    document.writeln(starLay);

    initMeteor();

    // End -->

    </SCRIPT>

    放在版版請將上列程式複製到編輯公告裡

    上列複製到<BODY>與</BODY>之間

    Source(s): 自己
    • Commenter avatarLogin to reply the answers
  • Anonymous
    2 decades ago

    就把那些英文自把ㄊ複製!然後貼上~就好哩!

    • Commenter avatarLogin to reply the answers
  • Anonymous
    2 decades ago

    請問一下把那個複製到編輯公告裡就行了ㄇ??編輯公告是指編輯ccs那個ㄇ?? 那ccs裡面本來就有一行字了要把他刪掉嗎??

    • Commenter avatarLogin to reply the answers
  • Anonymous
    2 decades ago

    http://black.demons.to/

    建議你ㄑ這裡看看唄!

    • Commenter avatarLogin to reply the answers
Still have questions? Get your answers by asking now.