Datamaskin
  | Hjem | Hardware | Nettverk | Programmering | Software | Feilsøking | Systems | 
Programmering  
  • C /C + + Programming
  • Computer Programmeringsspråk
  • Delphi Programming
  • Java Programming
  • JavaScript Programmering
  • PHP /MySQL programmering
  • Perl Programming
  • Python Programming
  • Ruby Programming
  • Visual Basics Programming
  •  
    Datamaskin >> Programmering >> JavaScript Programmering >> Content
    Hvordan Rull ned i JavaScript
    The Document Object Model, eller DOM , gir en standard måte å manipulere HTML med et skriptspråk eller programmeringsspråk. Den "vindu" objekt i DOM refererer til den aktive vinduet og inneholder mange attributter og elementer som videre definerer vinduet. Den " scrollBy "-metoden gjør det mulig å bla i vinduet et visst antall bla trinn , og du kan ringe som metode for å bla nedover i et vindu ved hjelp av JavaScript. Instruksjoner
    en

    Lag en ny HTML-dokument med Notepad eller en HTML- editor. Inn HTML overskrifter for filen . ! For eksempel skrive : en

    < DOCTYPE html PUBLIC "- //W3C //DTD XHTML 1.0 Transitional //EN " " http://www.w3.org/TR/xhtml1/DTD/xhtml1 - transitional.dtd " >



    < p >

    Scroll Eksempel < /title > <br> <br > 2 <p> Opprett en JavaScript -funksjon som vil bruke " scrollBy " metode for å rulle skjermen ned med 50 piksler . For eksempel skrive : en <p> <script type="text/javascript"> <br> <p> funksjon scrollWindow ( ) { <br> <p> window.scrollBy ( 0,50 ) ; <br> <p> } <br> <p> < /script > <br> <p> < /head> <br> 3 <p> Legg en knapp på skjermen som vil ringe JavaScript- bla -funksjonen når du klikker . For eksempel skrive : en <p> <body> <br> <p> <form id="myForm"> < input type = " button" verdi "Scroll " onclick = " scrollWindow ( )" /> < /form > <br> <p> < /body > <br> <p> < /html > <br> <br> <div class=ad2><script language='javascript' src='/ad/201310/4.js'></script></div> </div> </td> </tr> </table> <table width="745" height="1" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ecf0f4"> <tr> <td bgcolor="#ecf0f4"></td> </tr> </table> <table border="0" cellspacing="0" cellpadding="0" width="100%" height="7"> <tr> <td></td> </tr> </table> <table border="0" cellspacing="0" cellpadding="0" width="95%" align="center" height="26"> <tr> <td width="51%"><p>früher : <a class='LinkPrevArticle' href='http://www.datamaskin.biz/Programmering/javascript-programming/91020.html' >Slik skjuler et rullefelt med JavaScript </a></li></p></td> </tr> <tr> <td width="49%"> Weiter: <a class='LinkNextArticle' href='http://www.datamaskin.biz/Programmering/javascript-programming/91022.html' >Hvordan Sammenlign Dato objekter i JavaScript </a></li></td> </tr> </table> <table border="0" cellspacing="0" cellpadding="0" width="100%" height="7"> <tr> <td></td> </tr> </table></td> </tr> </table> <table border=0 cellSpacing=0 cellPadding=0 width="100%" height=7> <tr> <td></td> </tr> </table> <table border=0 cellSpacing=0 cellPadding=0 width=770 align=center height=246> <tr> <td height=246 vAlign=top width=375> <table class=bian border=0 cellSpacing=0 cellPadding=0 width=380> <tr> <td height=244 vAlign=top> <table border=0 cellSpacing=0 cellPadding=0 width="100%" bgColor=#dbe3ee> <tr> <td height=29 width="4%"> </td> <td width="96%"><strong>Relatert Artike</strong></td> </tr> </table> <table border=0 cellSpacing=4 cellPadding=0 width="95%" align=center height=209> <tr> <td height=201> <table width="100%" cellpadding="0" cellspacing="0"><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/javascript-programming/90813.html" title="Hvordan få et element Bredde i Javascript " target="_self">Hvordan få et element Bredde i Javascript </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/javascript-programming/91225.html" title="Hvordan å diagnostisere problemer med Javascript " target="_self">Hvordan å diagnostisere problemer med Javascript </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/javascript-programming/91196.html" title="Hvordan Wear en Shift Dress " target="_self">Hvordan Wear en Shift Dress </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/javascript-programming/91038.html" title="Slik fjerner JavaScript " target="_self">Slik fjerner JavaScript </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/javascript-programming/91170.html" title="Hvordan lage Gemstone Soap " target="_self">Hvordan lage Gemstone Soap </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/javascript-programming/90782.html" title="Kombinasjon av JavaScript Hurtigtaster " target="_self">Kombinasjon av JavaScript Hurtigtaster </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/javascript-programming/90865.html" title="Hvordan tillate ASP.NET validators Med JavaScript " target="_self">Hvordan tillate ASP.NET validators Med JavaScript </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/javascript-programming/90908.html" title="Hvordan gjøre JavaScript for å bla annonser " target="_self">Hvordan gjøre JavaScript for å bla annonser </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/javascript-programming/90815.html" title="Hvordan lage Alle Radio Knapper False i JavaScript " target="_self">Hvordan lage Alle Radio Knapper False i JavaScript </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/javascript-programming/90998.html" title="Hvordan få Browser Width " target="_self">Hvordan få Browser Width </a></td></tr><tr></tr></table></td> </tr> </table> </td> </tr> </table> </td> <td vAlign=top width=20></td> <td vAlign=top width=375> <table class=bian border=0 cellSpacing=0 cellPadding=0 width=380> <tr> <td height=244 vAlign=top> <table border=0 cellSpacing=0 cellPadding=0 width="100%" bgColor=#dbe3ee> <tr> <td height=29 width="4%"> </td> <td width="96%"><strong>Anbefalte artikler </strong></td> </tr> </table> <table border=0 cellSpacing=4 cellPadding=0 width="95%" align=center height=207> <tr> <td height=199> <table width="100%" cellpadding="0" cellspacing="0"><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/python-programming/94046.html" title="Hvordan Split en streng i en liste i Python " target="_self">Hvordan Split en streng i en liste i Python </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/php-mysql-programming/92966.html" title="Hvordan koble 4D Med PHP " target="_self">Hvordan koble 4D Med PHP </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/computer-programming-languages/87378.html" title="Office Communicator Protokoller " target="_self">Office Communicator Protokoller </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/computer-programming-languages/88608.html" title="Slik konverterer en ANSI til en HEX " target="_self">Slik konverterer en ANSI til en HEX </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/cc-programming/86135.html" title="Hvordan bygge en Game Engine From Scratch " target="_self">Hvordan bygge en Game Engine From Scratch </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/visual-basics-programming/94763.html" title="Hvordan oppdaterer en Gridview " target="_self">Hvordan oppdaterer en Gridview </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/computer-programming-languages/88341.html" title="Hvordan konverterer jeg en Plotter Fil " target="_self">Hvordan konverterer jeg en Plotter Fil </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/computer-programming-languages/87921.html" title="Lett CGI Problemer " target="_self">Lett CGI Problemer </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/php-mysql-programming/91781.html" title="PHP Transfer verdier " target="_self">PHP Transfer verdier </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="http://www.datamaskin.biz/Programmering/php-mysql-programming/92039.html" title="Hvordan legge Script manuelt på MySQL " target="_self">Hvordan legge Script manuelt på MySQL </a></td></tr><tr></tr></table></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <table border=0 cellSpacing=0 cellPadding=0 width=980 height=8> <tr> <td></td> </tr> </table> <table border=0 cellSpacing=0 cellPadding=0 width=980 bgColor=#36506e height=90> <tr> <td class=bs height=90 align=center>Copyright ©  Datamaskin  http://www.datamaskin.biz/ <script language='javascript' src='/ad/201310/1.js'></script></td> </tr> </table> </div> </body> </html>