Ребят,срочный хелп

Discussion in 'PHP' started by Savedracon, 28 Oct 2009.

  1. Savedracon

    Savedracon New Member

    Joined:
    8 Nov 2008
    Messages:
    41
    Likes Received:
    2
    Reputations:
    -1
    Написал скрипт.Отражается почему - то только в осле.
    С меня плюсик =)
    <html>
    <head>
    <meta http-equiv="Выберите расширение для паковки" content="text/html; charset=windows-1251" />
    <title>Г</title>

    </head>

    <body onload=blurtext()>
    <center>

    <SCRIPT LANGUAGE="JavaScript">
    <!--

    var thissize=12
    var textfont="Verdana"

    var textcolor= new Array()
    textcolor[0]="EEEEEE"
    textcolor[1]="DDDDDD"
    textcolor[2]="CCCCCC"
    textcolor[3]="AAAAAA"
    textcolor[4]="888888"
    textcolor[5]="666666"
    textcolor[6]="555555"
    textcolor[7]="444444"
    textcolor[8]="333333"
    textcolor[9]="222222"
    textcolor[10]="111111"
    textcolor[11]="000000"

    var message = new Array()
    message[0]="Gaudeamus igitur..."
    message[1]="Итак, будем веселиться..."

    var i_blurstrength=50
    var i_message=0
    var i_textcolor=0

    function blurtext() {
    if(document.all) {
    if (i_blurstrength >=-2) {
    if (i_textcolor >=textcolor.length-1) {i_textcolor=textcolor.length-1}
    blurthis.innerHTML="<span id='blurpit1'

    style='position:absolute;visibility:visible;top:5px;left:100px;filter:blur(add=0,strength="+i_blurstrength+",dir

    ection=90);font-family:"+textfont+";font-size:"+thissize+"pt;color:"+textcolor[i_textcolor]+"'>"+message[i_messa

    ge]+"</span>";
    document.close()
    i_blurstrength=i_blurstrength-2
    i_textcolor++
    var timer=setTimeout("blurtext()",100)
    }

    else {
    if (i_textcolor >=textcolor.length-1) {i_textcolor=textcolor.length-1}
    blurthis.innerHTML="<span id='blurit1'

    style='position:absolute;visibility:visible;top:5px;left:100px;filter:blendTrans(duration=4.2);font-family:"+tex

    tfont+";font-size:"+thissize+"pt;color:black'>"+message[i_message]+"</span>";
    i_message++
    if (i_message>=message.length){i_message=0}

    i_blurstrength=20
    i_textcolor=0
    clearTimeout(timer)
    var timer=setTimeout("blurtext()",300)
    }
    }
    }

    // - End of JavaScript - -->
    </SCRIPT>




    <p id=blurthis style="VISIBILITY: visible; POSITION: absolute"></p>
    </center>

    </body>
    </html>
     
  2. Byte_

    Byte_ Elder - Старейшина

    Joined:
    7 Sep 2008
    Messages:
    143
    Likes Received:
    34
    Reputations:
    2
    с тебя много плюсиков! весь мозг съел пока додумался. =)
    document.all это помоему только ie'шная штука.
    замени document.all на true и всё будет работать =)
    Code:
    <html>
    <head>
    <meta http-equiv="Выберите расширение для паковки" content="text/html; charset=windows-1251" />
    <title>Г</title>
    
    </head>
    
    <body onload=blurtext()>
    <center>
    
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    
    var thissize=12
    var textfont="Verdana"
    
    var textcolor= new Array()
    textcolor[0]="EEEEEE"
    textcolor[1]="DDDDDD"
    textcolor[2]="CCCCCC"
    textcolor[3]="AAAAAA"
    textcolor[4]="888888"
    textcolor[5]="666666"
    textcolor[6]="555555"
    textcolor[7]="444444"
    textcolor[8]="333333"
    textcolor[9]="222222"
    textcolor[10]="111111"
    textcolor[11]="000000"
    
    var message = new Array()
    message[0]="Gaudeamus igitur..."
    message[1]="Итак, будем веселиться..."
    
    var i_blurstrength=50
    var i_message=0
    var i_textcolor=0
    
    function blurtext() {
    if(true) {
    if (i_blurstrength >=-2) {
    if (i_textcolor >=textcolor.length-1) {i_textcolor=textcolor.length-1}
    blurthis.innerHTML="<span id='blurpit1' style='position:absolute;visibility:visible;top:5p x;left:100px;filter:blur(add=0,strength="+i_blurstrength+",direction=90);font-family:"+textfont+";font-size:"+thissize+"pt;color:"+textcolor[i_textcolor]+"'>"+message[i_message]+"</span>";
    document.close()
    i_blurstrength=i_blurstrength-2
    i_textcolor++
    var timer=setTimeout("blurtext()",100)
    }
    
    else {
    if (i_textcolor >=textcolor.length-1) {i_textcolor=textcolor.length-1}
    blurthis.innerHTML="<span id='blurit1' style='position:absolute;visibility:visible;top:5p x;left:100px;filter:blendTrans(duration=4.2);font-family:"+textfont+";font-size:"+thissize+"pt;color:black'>"+message[i_message]+"</span>";
    i_message++
    if (i_message>=message.length){i_message=0}
    
    i_blurstrength=20
    i_textcolor=0
    clearTimeout(timer)
    var timer=setTimeout("blurtext()",300)
    }
    }
    }
    
    // - End of JavaScript - -->
    </SCRIPT>
    
    
    
    
    <p id=blurthis style="VISIBILITY: visible; POSITION: absolute"></p>
    </center>
    
    </body>
    </html>
    
    ЗЫ: только так красиво вышло только в ie... в остальных просто плавно исчезает и появляется.
     
    2 people like this.
  3. Savedracon

    Savedracon New Member

    Joined:
    8 Nov 2008
    Messages:
    41
    Likes Received:
    2
    Reputations:
    -1
    Пасиб =)