• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

自动翻页_js

javascript 搞代码 7年前 (2018-06-13) 194次浏览 已收录 0个评论

鼠标放到翻页的地方,自动翻页

<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>
                    <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

http://www.gaodaima.com/27573.html

//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>
                  <SCRIPT language=javaScript1.2>
if (iens6)
document.write(‘</div></div>’)
</SCRIPT>

                  <TABLE width=”96%”>
                    <TBODY>
                    <TR>
                      <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>
                  <SCRIPT language=JavaScript1.2>
if (iens6){
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(){
if (iens6)
contentheight=crossobj.offsetHeight
else if (ns4)
document.nscontainer.document.nscontent.visibility=”show”
}
window.onload=getcontent_height
</SCRIPT>
                </TD></TR></TBODY></TABLE></CENTER></DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>

欢迎大家阅读《自动翻页_js,跪求各位点评,若觉得好的话请收藏本文,by 搞代码


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:自动翻页_js

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址