匿名使用者
匿名使用者 發問時間: 社會與文化語言 · 1 0 年前

問語法…〝緊急〞需要!

偶要炸咕網址→ http://gb4.demons.to/afgb.php?A=doll820909 ←背景有雙重星星飛過ㄉ語法!!!

2 個解答

評分
  • 匿名使用者
    1 0 年前
    最佳解答

    <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:色碼; 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="色碼" style="font-size:'

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

    }

    }

    document.writeln(starLay);

    initMeteor();

    // End -->

    </SCRIPT>

    請自己改色碼部分......還有盡量不要用火星文..謝謝

    參考資料: 我自己的留言板
    • 登入以對解答發表意見
  • 匿名使用者
    1 0 年前

    版大請長大點好嗎?是不會打正統的國字啊..

    • 登入以對解答發表意見
還有問題?馬上發問,尋求解答。