Heim Web-Frontend js-Tutorial 网上抓的一个特效_javascript技巧

网上抓的一个特效_javascript技巧

May 16, 2016 pm 07:13 PM

特效在窗口左边,可否改在窗口右边???
效果页面代码:
<script> <BR> ad_p1_sp15_n6 = ''; <BR> ad_p1_sp15_n7 = ''; <BR> ad_p1_sp15_n8 = ''; <BR> </script>




  
  
    

      

      <script>document.write(ad_p1_sp15_n6);</script>
      

<script> <BR><!-- <BR> document.getElementById("divTopAd").innerHTML = document.getElementById("divTopAdTmp").innerHTML; <BR> document.getElementById("divTopAdTmp").innerHTML = ""; <BR>//--> <BR></script>


<script>document.write(ad_p1_sp15_n7);</script>


<script>document.write(ad_p1_sp15_n8);</script>

<script> <BR><!-- <BR> document.getElementById("divBottomAd").innerHTML = document.getElementById("divBottomAdTmp").innerHTML; <BR> document.getElementById("divBottomAdTmp").innerHTML = ""; <BR>//--> <BR></script>

<script>src="menu.js"></script>
menu.js 文件代码:

[Copy to clipboard] [ - ]CODE:
//----begin-----共用函数-----
function buildBar() 
{
    if(barText.indexOf('网上抓的一个特效_javascript技巧-1) 
    {
        tempBar=barText;
    }
    else
    {
        for (b=0;b        {
            tempBar+=barText.charAt(b)+"
";
        }
    }
    document.write('网上抓的一个特效_javascript技巧')
}
//----end-----共用函数-----

//----begin-----IE浏览器部分-----

function moveIEOut() 
{
    if (ssm.pixelLeft    {
        clearTimeout(moving);moving = setTimeout('moveIEOut()', slideSpeed);slideIEMenu(10)
    }
    else
    {
        clearTimeout(moving);moving=setTimeout('null',1)
    }
}

function moveIEBack() 
{
    clearTimeout(moving);moving = setTimeout('moveIEBack1()', waitTime)
}
function moveIEBack1() 
{
    if (ssm.pixelLeft>(-menuWidth)) 
    {
        clearTimeout(moving);moving = setTimeout('moveIEBack1()', slideSpeed);slideIEMenu(-10)
    }
    else 
    {
        clearTimeout(moving);moving=setTimeout('null',1)
    }
}

function slideIEMenu(num)
{
    ssm.pixelLeft += num;
}

function makeIEStatic() 
{
    winY = document.body.scrollTop;
    if (winY!=lastY&&winY>YOffset-staticYOffset) 
    {
        smooth = .2 * (winY - lastY - YOffset + staticYOffset);
    }
    else if (YOffset-staticYOffset+lastY>YOffset-staticYOffset) 
    {
        smooth = .2 * (winY - lastY - (YOffset-(YOffset-winY)));
    }
    else 
    {
        smooth=0;
    }
    if(smooth > 0) 
    {
        smooth = Math.ceil(smooth);
    }
    else
    {
        smooth = Math.floor(smooth);
    }
    bssm.pixelTop+=smooth;
    lastY = lastY+smooth;
    setTimeout('makeIEStatic()', 1)
}

function initIESlide() 
{
    ssm=document.all("thessm").style;
    bssm=document.all("basessm").style;
    bssm.clip="rect(0 "+thessm.offsetWidth+" "+thessm.offsetHeight+" 0)";
    bssm.visibility = "visible";
    if (menuIsStatic=="yes") 
    {
        makeIEStatic();
    }
}

function buildIEMenu()
{
    document.write('
')
    document.write('');
    for(i=0;i    {
        if(!ssmItems[i][3])
        {
            ssmItems[i][3]=menuCols;
            ssmItems[i][5]=menuWidth-1;
        }
        else if(ssmItems[i][3]!=menuCols)
        {
            ssmItems[i][5]=Math.round(menuWidth*(ssmItems[i][3]/menuCols)-1);
        }
        if(ssmItems[i-1]&&ssmItems[i-1][4]!="no")
        {
            document.write('
');
        }
        if(!ssmItems[i][1])
        {
            document.write('')
        }
        else 
        {
            if(!ssmItems[i][2])
            {
                ssmItems[i][2]=linkTarget;
            }
            document.write('')
        }
        if(ssmItems[i][4]!="no"&&barBuilt==0)
        {
            buildBar();
            barBuilt=1;
        }
        if(ssmItems[i][4]!="no")
        {
            document.write('')
        }
    }
    document.write('
 '+ssmItems[i][0]+'
')
    document.write('
')
    theleft=-menuWidth;lastY=0;setTimeout('initIESlide();', 1)
}
//----end-----IE浏览器部分-----

//----begin-----NS部分-----
function moveNSOut() 
{
    if (parseInt(ssm.left)    {
        clearTimeout(moving);moving = setTimeout('moveNSOut()', slideSpeed);slideNSMenu(10)
    }
    else
    {
        clearTimeout(moving);moving=setTimeout('null',1)
    }
}

function moveNSBack() 
{
    clearTimeout(moving);moving = setTimeout('moveNSBack1()', waitTime)
}

function moveNSBack1() 
{
    if (parseInt(ssm.left)>(-menuWidth)) 
    {
        clearTimeout(moving);moving = setTimeout('moveNSBack1()', slideSpeed);slideNSMenu(-10)
    }
    else 
    {
        clearTimeout(moving);moving=setTimeout('null',1)
    }
}

function slideNSMenu(num)
{
    ssm.left = parseInt(ssm.left)+num;
    bssm.clip.right+=num;bssm2.clip.right+=num;
}

function makeNSStatic() 
{
    winY = window.pageYOffset;
    if (winY!=lastY&&winY>YOffset-staticYOffset) 
    {
        smooth = .2 * (winY - lastY - YOffset + staticYOffset);
    }
    else if (YOffset-staticYOffset+lastY>YOffset-staticYOffset) 
    {
        smooth = .2 * (winY - lastY - (YOffset-(YOffset-winY)));
    }
    else 
    {
        smooth=0;
    }
    if(smooth > 0) 
    {
        smooth = Math.ceil(smooth);
    }
    else
    {
        smooth = Math.floor(smooth);
    }
    bssm.top=parseInt(bssm.top)+smooth
    lastY = lastY+smooth;
    setTimeout('makeNSStatic()', 1)
}

function initNSSlide() 
{
    bssm=document.layers["basessm1"];
    bssm2=bssm.document.layers["basessm2"];ssm=bssm2.document.layers["thessm"];
    bssm2.clip.left=0;ssm.visibility = "show";
    if (menuIsStatic=="yes") 
    {
        makeNSStatic();
    }
}

function buildNSMenu()
{
    document.write('')
    document.write('');
    for(i=0;i    {
        if(!ssmItems[i][3])
        {
            ssmItems[i][3]=menuCols;
            ssmItems[i][5]=menuWidth-1;
        }
        else if(ssmItems[i][3]!=menuCols)
        {
            ssmItems[i][5]=Math.round(menuWidth*(ssmItems[i][3]/menuCols)-1);
        }
        if(ssmItems[i-1]&&ssmItems[i-1][4]!="no")
        {
            document.write('
');
        }
        if(!ssmItems[i][1])
        {
            document.write('')
        }
        else 
        {
            if(!ssmItems[i][2])
            {
                ssmItems[i][2]=linkTarget;
            }
            document.write('')
        }
        if(ssmItems[i][4]!="no"&&barBuilt==0)
        {
            buildBar();
            barBuilt=1;
        }
        if(ssmItems[i][4]!="no")
        {
            document.write('')
        }
    }
    document.write('
 '+ssmItems[i][0]+'
')
    document.write('
')
    theleft=-menuWidth;lastY=0;setTimeout('initNSSlide();', 1)
}
//-----end------NS部分-----

//-----begin------NS6部分-----
function moveNS6Out() 
{
    if (parseInt(ssm.left)    {
        clearTimeout(moving);moving = setTimeout('moveNS6Out()', slideSpeed);slideNS6Menu(10)
    }
    else
    {
        clearTimeout(moving);moving=setTimeout('null',1)
    }
}
function moveNS6Back() 
{
    clearTimeout(moving);moving = setTimeout('moveNS6Back1()', waitTime)
}
function moveNS6Back1() 
{
    if (parseInt(ssm.left)>(-menuWidth)) 
    {
        clearTimeout(moving);moving = setTimeout('moveNS6Back1()', slideSpeed);slideNS6Menu(-10)
    }
    else 
    {
        clearTimeout(moving);moving=setTimeout('null',1)
    }
}

function slideNS6Menu(num)
{
    ssm.left = parseInt(ssm.left)+num;
}

function makeNS6Static() 
{
    winY = window.pageYOffset;
    if (winY!=lastY&&winY>YOffset-staticYOffset) 
    {
        smooth = .2 * (winY - lastY - YOffset + staticYOffset);
    }
    else if (YOffset-staticYOffset+lastY>YOffset-staticYOffset) 
    {
        smooth = .2 * (winY - lastY - (YOffset-(YOffset-winY)));
    }
    else 
    {
        smooth=0;
    }
    if(smooth > 0) 
    {
        smooth = Math.ceil(smooth);
    }
    else
    {
        smooth = Math.floor(smooth);
    }
    bssm.top=parseInt(bssm.top)+smooth
    lastY = lastY+smooth;
    setTimeout('makeNS6Static()', 1)
}

function initNS6Slide() 
{
    ssm=document.getElementById("thessm").style;bssm=document.getElementById("basessm").style;
    bssm.clip="rect(0 "+document.getElementById("thessm").offsetWidth+" "+document.getElementById("thessm").offsetHeight+" 0)";
    ssm.visibility="visible";
    if (menuIsStatic=="yes") 
    {
        makeNS6Static();
    }
}

function buildNS6Menu() 
{
    document.write('
')
    document.write('
')
    document.write('');
    for(i=0;i    {
        if(!ssmItems[i][3])
        {
            ssmItems[i][3]=menuCols;
            ssmItems[i][5]=menuWidth-1;
        }
        else if(ssmItems[i][3]!=menuCols)
        {
            ssmItems[i][5]=Math.round(menuWidth*(ssmItems[i][3]/menuCols)-1);
        }
        if(ssmItems[i-1]&&ssmItems[i-1][4]!="no")
        {
            document.write('
');
        }
        if(!ssmItems[i][1])
        {
            document.write('')
        }
        else 
        {
            if(!ssmItems[i][2])
            {
                ssmItems[i][2]=linkTarget;
            }
            document.write('')
        }
        if(ssmItems[i][4]!="no"&&barBuilt==0)
        {
            buildBar();
            barBuilt=1;
        }
        if(ssmItems[i][4]!="no")
        {
            document.write('')
        }
    }
    document.write('
 '+ssmItems[i][0]+'
')
    document.write('
')
    document.write('
')
    theleft=-menuWidth;lastY=0;setTimeout('initNS6Slide();', 1)
}
//-----end------NS6部分-----

NS6 = (document.getElementById&&!document.all)
IE = (document.all)
NS = (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4")
tempBar='';barBuilt=0;ssmItems=new Array();
moving=setTimeout('null',1)

YOffset=150;
XOffset=0;
staticYOffset=30;
slideSpeed=20
waitTime=50;
menuBGColor="";
menuIsStatic="yes";
menuWidth=100;
menuCols=2;
hdrFontFamily="verdana";
hdrFontSize="2";
hdrFontColor="#000000";
hdrBGColor="#ffffff";
hdrAlign="left";
hdrVAlign="center";
hdrHeight="15";
linkFontFamily="Verdana";
linkFontSize="2";
linkBGColor="white";
linkOverBGColor="#FFFF99";
linkTarget="_top";
linkAlign="Left";
barBGColor="";
barFontFamily="Verdana";
barFontSize="2";
barFontColor="#ff3333";
barVAlign="center";
barWidth=20;
barText="※乐趣 个人事务所※"; 

ssmItems[0]=["我要注册", "/eden/ctl_eden_login.php?ctlObj=login_protocol", "_blank"]
ssmItems[1]=["我的首页", "/eden/ctl_eden.php", "_blank"]
ssmItems[2]=["我的收藏夹", "/eden/ctl_eden.php?ctlOprType=get&ctlObj=favorites", "_blank"]
ssmItems[3]=["我的好友", "/eden/ctl_eden.php?ctlOprType=get&ctlObj=friends", "_blank"]
ssmItems[4]=["我的留言", "/eden/ctl_eden.php?ctlOprType=get&ctlObj=msgs", "_blank"]
ssmItems[5]=["我的论坛", "/eden/forum/ctl_eden_forum.php", "_blank"]
ssmItems[6]=["我的博客", "/eden/blog/", "_blank"]
ssmItems[7]=["我的相册", "/eden/album/", "_blank"]
ssmItems[8]=["图片管理", "/eden/upload/ctl_upload.php", "_blank"]
ssmItems[9]=["高级搜索", "/eden/search_menu.html", "_blank"]
ssmItems[10]=["热线帮助", "http://hk.netsh.com/eden/bbs/154/", "_blank"]
ssmItems[11]=["退出登录", "/eden/ctl_eden_login.php?ctlOprType=put&ctlObj=login_out", ""]

if(IE)
{
    buildIEMenu();
}
else if(NS)
{
    buildNSMEnu();
}
else if(NS6)
{
    buildNS6MEnu();
}
else
{
    alert("不能运行!");
}
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn

Heiße KI -Werkzeuge

Undresser.AI Undress

Undresser.AI Undress

KI-gestützte App zum Erstellen realistischer Aktfotos

AI Clothes Remover

AI Clothes Remover

Online-KI-Tool zum Entfernen von Kleidung aus Fotos.

Undress AI Tool

Undress AI Tool

Ausziehbilder kostenlos

Clothoff.io

Clothoff.io

KI-Kleiderentferner

Video Face Swap

Video Face Swap

Tauschen Sie Gesichter in jedem Video mühelos mit unserem völlig kostenlosen KI-Gesichtstausch-Tool aus!

Heiße Werkzeuge

Notepad++7.3.1

Notepad++7.3.1

Einfach zu bedienender und kostenloser Code-Editor

SublimeText3 chinesische Version

SublimeText3 chinesische Version

Chinesische Version, sehr einfach zu bedienen

Senden Sie Studio 13.0.1

Senden Sie Studio 13.0.1

Leistungsstarke integrierte PHP-Entwicklungsumgebung

Dreamweaver CS6

Dreamweaver CS6

Visuelle Webentwicklungstools

SublimeText3 Mac-Version

SublimeText3 Mac-Version

Codebearbeitungssoftware auf Gottesniveau (SublimeText3)

Was soll ich tun, wenn ich auf den Codendruck auf Kleidungsstücke für Front-End-Thermalpapier-Quittungen stoße? Was soll ich tun, wenn ich auf den Codendruck auf Kleidungsstücke für Front-End-Thermalpapier-Quittungen stoße? Apr 04, 2025 pm 02:42 PM

Häufig gestellte Fragen und Lösungen für das Ticket-Ticket-Ticket-Ticket in Front-End im Front-End-Entwicklungsdruck ist der Ticketdruck eine häufige Voraussetzung. Viele Entwickler implementieren jedoch ...

Wer bekommt mehr Python oder JavaScript bezahlt? Wer bekommt mehr Python oder JavaScript bezahlt? Apr 04, 2025 am 12:09 AM

Es gibt kein absolutes Gehalt für Python- und JavaScript -Entwickler, je nach Fähigkeiten und Branchenbedürfnissen. 1. Python kann mehr in Datenwissenschaft und maschinellem Lernen bezahlt werden. 2. JavaScript hat eine große Nachfrage in der Entwicklung von Front-End- und Full-Stack-Entwicklung, und sein Gehalt ist auch beträchtlich. 3. Einflussfaktoren umfassen Erfahrung, geografische Standort, Unternehmensgröße und spezifische Fähigkeiten.

Entmystifizieren JavaScript: Was es tut und warum es wichtig ist Entmystifizieren JavaScript: Was es tut und warum es wichtig ist Apr 09, 2025 am 12:07 AM

JavaScript ist der Eckpfeiler der modernen Webentwicklung. Zu den Hauptfunktionen gehören eine ereignisorientierte Programmierung, die Erzeugung der dynamischen Inhalte und die asynchrone Programmierung. 1) Ereignisgesteuerte Programmierung ermöglicht es Webseiten, sich dynamisch entsprechend den Benutzeroperationen zu ändern. 2) Die dynamische Inhaltsgenerierung ermöglicht die Anpassung der Seiteninhalte gemäß den Bedingungen. 3) Asynchrone Programmierung stellt sicher, dass die Benutzeroberfläche nicht blockiert ist. JavaScript wird häufig in der Webinteraktion, der einseitigen Anwendung und der serverseitigen Entwicklung verwendet, wodurch die Flexibilität der Benutzererfahrung und die plattformübergreifende Entwicklung erheblich verbessert wird.

Wie fusioniere ich Arrayelemente mit derselben ID mit JavaScript in ein Objekt? Wie fusioniere ich Arrayelemente mit derselben ID mit JavaScript in ein Objekt? Apr 04, 2025 pm 05:09 PM

Wie fusioniere ich Array -Elemente mit derselben ID in ein Objekt in JavaScript? Bei der Verarbeitung von Daten begegnen wir häufig die Notwendigkeit, dieselbe ID zu haben ...

Der Unterschied in der Konsole.log -Ausgabeergebnis: Warum unterscheiden sich die beiden Anrufe? Der Unterschied in der Konsole.log -Ausgabeergebnis: Warum unterscheiden sich die beiden Anrufe? Apr 04, 2025 pm 05:12 PM

Eingehende Diskussion der Ursachen des Unterschieds in der Konsole.log-Ausgabe. In diesem Artikel wird die Unterschiede in den Ausgabeergebnissen der Konsolenfunktion in einem Code analysiert und die Gründe dafür erläutert. � ...

Wie kann man Parallax -Scrolling- und Element -Animationseffekte wie die offizielle Website von Shiseido erzielen?
oder:
Wie können wir den Animationseffekt erzielen, der von der Seite mit der Seite mit der offiziellen Website von Shiseido begleitet wird? Wie kann man Parallax -Scrolling- und Element -Animationseffekte wie die offizielle Website von Shiseido erzielen? oder: Wie können wir den Animationseffekt erzielen, der von der Seite mit der Seite mit der offiziellen Website von Shiseido begleitet wird? Apr 04, 2025 pm 05:36 PM

Diskussion über die Realisierung von Parallaxe -Scrolling- und Elementanimationseffekten in diesem Artikel wird untersuchen, wie die offizielle Website der Shiseeido -Website (https://www.shiseeido.co.jp/sb/wonderland/) ähnlich ist ...

Ist JavaScript schwer zu lernen? Ist JavaScript schwer zu lernen? Apr 03, 2025 am 12:20 AM

JavaScript zu lernen ist nicht schwierig, aber es ist schwierig. 1) Verstehen Sie grundlegende Konzepte wie Variablen, Datentypen, Funktionen usw. 2) Beherrschen Sie die asynchrone Programmierung und implementieren Sie sie durch Ereignisschleifen. 3) Verwenden Sie DOM -Operationen und versprechen Sie, asynchrone Anfragen zu bearbeiten. 4) Vermeiden Sie häufige Fehler und verwenden Sie Debugging -Techniken. 5) Die Leistung optimieren und Best Practices befolgen.

So implementieren Sie die Funktion des Ziell- und Drop-Einstellungsfunktion, ähnlich wie bei VSCODE in der Front-End-Entwicklung? So implementieren Sie die Funktion des Ziell- und Drop-Einstellungsfunktion, ähnlich wie bei VSCODE in der Front-End-Entwicklung? Apr 04, 2025 pm 02:06 PM

Erforschen Sie die Implementierung der Funktion des Bedien- und Drop-Einstellungsfunktion der Panel ähnlich wie VSCODE im Front-End. In der Front-End-Entwicklung wird VSCODE ähnlich wie VSCODE implementiert ...

See all articles