天天看點

自動翻頁

滑鼠放到翻頁的地方,自動翻頁

<link href="1/css.css"

type=text/css rel=stylesheet>

    <table cellspacing=0 cellpadding=5 width="95%" align=center

                  border=0>

                    <tbody>

                    <tr>

                      <td height=30>

                        <div class=style1 align=center>翻頁效果</div></td></tr>

                      <td class=unnamed1 valign=top height=420><iframe

                        border=0 name=demo marginwidth=0 marginheight=0

                        src="1/show.htm"

                        frameborder=no width=600 scrolling=no height=415

                        allowtransparency>浏覽器不支援嵌入式架構,或被配置為不顯示嵌入式架構。</iframe></td></tr></tbody></table>

ifame裡面要用的檔案

<link href="show.files/css.css" type=text/css rel=stylesheet>

<style type=text/css>body {

 margin: 0px

}

</style>

<meta content="mshtml 6.00.2900.3059" name=generator></head>

<body style="background-color: transparent">

<table cellspacing=0 cellpadding=0 width=300 border=0>

  <tbody>

  <tr>

    <td>

      <table cellspacing=0 cellpadding=0 width="100%" border=0>

        <tbody>

        <tr>

          <td align=middle>

            <div align=center>

            <center>

            <table height=222 cellspacing=1 cellpadding=5 width="100%"

              border=0><tbody>

              <tr>

                <td style="word-break: break-all">

                  <script language=javascript1.2>

iens6=document.all||document.getelementbyid

ns4=document.layers

//specify speed of scroll (greater=faster)

var speed=6

if (iens6){

document.write('<div id="container" style="position:relative;width:600;height:370;border:0px solid black;overflow:hidden">')

document.write('<div id="content" style="position:absolute;width:590;left:0;top:0">')

</script>

                  <ilayer clip="0,0,500,160" height="400" width="600"

                  name="nscontainer"><layer height="370" width="600"

                  name="nscontent"

                  visibility="hidden"><div align="center">111111111111111111111111111111111222222222<br>2222222222222222222222222222222222222222222222<br>22222222222222222222222222222222222222222222222<br>222222222222222222222223333333547<br>8567fsdafsdafasdffwertgfghfdhgjhhdf<br>111111111111111111111111111111111222222222<br>2222222222222222222222222222222222222222222222<br>22222222222222222222222222222222222222222222222<br>222222222222222222222223333333547<br>8567fsdafsdafasdffwertgfghfdhgjhhdf<br>111111111111111111111111111111111222222222<br>2222222222222222222222222222222222222222222222<br>22222222222222222222222222222222222222222222222<br>222222222222222222222223333333547<br>8567fsdafsdafasdffwertgfghfdhgjhhdf<br>111111111111111111111111111111111222222222<br>2222222222222222222222222222222222222222222222<br>22222222222222222222222222222222222222222222222<br>222222222222222222222223333333547<br>8567fsdafsdafasdffwertgfghfdhgjhhdf<br>111111111111111111111111111111111222222222<br>2222222222222222222222222222222222222222222222<br>22222222222222222222222222222222222222222222222<br>222222222222222222222223333333547<br>8567fsdafsdafasdffwertgfghfdhgjhhdf<br>111111111111111111111111111111111222222222<br>2222222222222222222222222222222222222222222222<br>22222222222222222222222222222222222222222222222<br>222222222222222222222223333333547<br>8567fsdafsdafasdffwertgfghfdhgjhhdf<br>111111111111111111111111111111111222222222<br>2222222222222222222222222222222222222222222222<br>22222222222222222222222222222222222222222222222<br>222222222222222222222223333333547<br>8567fsdafsdafasdffwertgfghfdhgjhhdf<br>111111111111111111111111111111111222222222<br>2222222222222222222222222222222222222222222222<br>22222222222222222222222222222222222222222222222<br>222222222222222222222223333333547<br>8567fsdafsdafasdffwertgfghfdhgjhhdf<br>gsaqwetghdfzvshkhjlkkjsghghdfgtuyikk</div></layer></ilayer>

if (iens6)

document.write('</div></div>')

                  <table width="96%">

                      <td>

                        <p align=right>|<a onmouseover=moveup()

                        onmouseout=cleartimeout(moveupvar)

                        href="#"> 向上

                        </a>|<a onmouseover=movedown()

                        onmouseout=cleartimeout(movedownvar)

                        href="#"> 向下

                        </a>|</p></td></tr></tbody></table>

var crossobj=document.getelementbyid? document.getelementbyid("content") : document.all.content

var contentheight=crossobj.offsetheight

else if (ns4){

var crossobj=document.nscontainer.document.nscontent

var contentheight=crossobj.clip.height

function movedown(){

if (iens6&&parseint(crossobj.style.top)>=(contentheight*(-1)+100))

crossobj.style.top=parseint(crossobj.style.top)-speed

else if (ns4&&crossobj.top>=(contentheight*(-1)+100))

crossobj.top-=speed

movedownvar=settimeout("movedown()",100)

function moveup(){

if (iens6&&parseint(crossobj.style.top)<=0)

crossobj.style.top=parseint(crossobj.style.top)+speed

else if (ns4&&crossobj.top<=0)

crossobj.top+=speed

moveupvar=settimeout("moveup()",100)

function getcontent_height(){

contentheight=crossobj.offsetheight

else if (ns4)

document.nscontainer.document.nscontent.visibility="show"

window.onload=getcontent_height

                </td></tr></tbody></table></center></div></td></tr></tbody></table></td></tr></tbody></table></body></html>

繼續閱讀