首页 | 站长免费中心 | 新手上路 | 网站运营 | 网页制作 | 图片设计 | 动画设计 | 网页编程 | 网页特效 | 本站专题 | 虚拟主机 | 域名注册 | 网站建设 | 程序下载
       免费空间资源 | 新闻咨询 | 免费域名 | 免费网盘 | 网站推广 | 网站策划 | 建站经验 | 网站优化 | 网页代码 | 源码下载 | 音乐小偷 | 网络赚钱 | 论坛交流
网站建设
网站建设
虚拟主机
虚拟主机
域名注册
域名注册
711网络首页
站长工具
站长工具
网站源码
网站源码
站长论坛
站长论坛

 711网络 网页编程ASP编程

[原创]同一页面两个同时向左滚动代码操作方法

来源: 互联网    日期:2012-9-27
 

Tc711Com提示:同一页面两个同时向左滚动代码操作方法  

<!------demoqq------->
                <div id="demoqq" style="OVERFLOW: hidden; WIDTH:890px; HEIGHT:170px;vertical-align:middle;">
                  <table height="100" border="0" cellpadding="0" cellspacing="0">
                    <tbody>
                      <tr>
                        <td align="center" valign="middle" id="demoqq1">
      <table width="740" height="170" border="0" cellpadding="0" cellspacing="0">
                        <tr>
    
     <%
     sql="select top 8 * from product where typenumber like '0003%' order by xp desc,sortNum desc,id desc"
     rs.open sql,conn,1,1
     if rs.recordcount=0 then
     response.Write"<span id=hei>暂无信息!</span>"
     else
     do while not rs.eof
     %>
     
                        <td width="942"  align="center" valign="middle"><table width="145" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="145" align="center"><table width="119" height="131" border="0" cellpadding="2" cellspacing="1" bgcolor="#774822">
                              <tr>
                                <td id="hei" align="center" valign="middle" bgcolor="#FDF0BB"><% If ishtml=1 Then %>
                                  <a href="<%= tc711F %><%=rs("id")%>.html" target="_self">
                                    <% Else %>
                                    <a href="/plists.asp?id=<%=rs("id")%>" target="_self">
                                    <% End If %>
                                    <img src="<%=rs("ppic1")%>" title="<%=rs("productName")%>" border="0" width="117" height="110" /></a></td>
                              </tr>
                            </table>
                              <table width="124" height="25" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                  <td align="center" valign="bottom" id="hei"><% If ishtml=1 Then %>
                                    <a href="<%= tc711F %><%=rs("id")%>.html" class="aa" target="_self" title="<%=rs("productName")%>">
                                      <% Else %>
                                      <a href="/plists.asp?id=<%=rs("id")%>" class="aa" target="_self" title="<%=rs("productName")%>">
                                      <% End If %>
                                      <%if len(rs("productName"))>8 then%>
                                      <%=left(rs("productName"),8)%>
                                      <%else%>
                                      <%=rs("productname")%>
                                      <%end if%>
                                    </a></td>
                                </tr>
                              </table></td>
                          </tr>
                        </table></td>
                        <%
     rs.movenext
     loop
     end if
     rs.close
     %>
    
    
                        </tr>
                        </table></td>
                        <td align="center" valign="middle" id="demoqq2"></td>
                      </tr>
                    </tbody>
                  </table>
                </div>
            <script language="JavaScript" type="text/javascript">
var demoqq = document.getElementById("demoqq");
var demoqq1 = document.getElementById("demoqq1");
var demoqq2 = document.getElementById("demoqq2");

var speedqq=40
demoqq2.innerHTML=demoqq1.innerHTML
function Marqueeqq(){
if(demoqq2.offsetWidth-demoqq.scrollLeft<=0)
demoqq.scrollLeft-=demoqq1.offsetWidth
else{
demoqq.scrollLeft++
}
}
var MyMarqq=setInterval(Marqueeqq,speedqq)
demoqq.onmouseover=function() {clearInterval(MyMarqq)}
demoqq.onmouseout=function() {MyMarqq=setInterval("Marqueeqq()",speedqq)}
            </script>
           
           
           
           
           
           
           
           
           
           
           
           
           
           
<!------demoxx------->
                <div id="demoxx" style="OVERFLOW: hidden; WIDTH:890px; HEIGHT:170px;vertical-align:middle;">
                  <table height="100" border="0" cellpadding="0" cellspacing="0">
                    <tbody>
                      <tr>
                        <td align="center" valign="middle" id="demoxx1">
      <table width="740" height="170" border="0" cellpadding="0" cellspacing="0">
                        <tr>
    
     <%
     sql="select top 8 * from product where typenumber like '0002%' order by xp desc,sortNum desc,id desc"
     rs.open sql,conn,1,1
     if rs.recordcount=0 then
     response.Write"<span id=hei>暂无信息!</span>"
     else
     do while not rs.eof
     %>
     
                        <td width="942"  align="center" valign="middle"><table width="145" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="145" align="center"><table width="119" height="131" border="0" cellpadding="2" cellspacing="1" bgcolor="#774822">
                              <tr>
                                <td id="hei" align="center" valign="middle" bgcolor="#FDF0BB"><% If ishtml=1 Then %>
                                  <a href="<%= tc711F %><%=rs("id")%>.html" target="_self">
                                    <% Else %>
                                    <a href="/plists.asp?id=<%=rs("id")%>" target="_self">
                                    <% End If %>
                                    <img src="<%=rs("ppic1")%>" title="<%=rs("productName")%>" border="0" width="117" height="110" /></a></td>
                              </tr>
                            </table>
                              <table width="124" height="25" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                  <td align="center" valign="bottom" id="hei"><% If ishtml=1 Then %>
                                    <a href="<%= tc711F %><%=rs("id")%>.html" class="aa" target="_self" title="<%=rs("productName")%>">
                                      <% Else %>
                                      <a href="/plists.asp?id=<%=rs("id")%>" class="aa" target="_self" title="<%=rs("productName")%>">
                                      <% End If %>
                                      <%if len(rs("productName"))>8 then%>
                                      <%=left(rs("productName"),8)%>
                                      <%else%>
                                      <%=rs("productname")%>
                                      <%end if%>
                                    </a></td>
                                </tr>
                              </table></td>
                          </tr>
                        </table></td>
                        <%
     rs.movenext
     loop
     end if
     rs.close
     %>
    
    
                        </tr>
                        </table></td>
                        <td align="center" valign="middle" id="demoxx2"></td>
                      </tr>
                    </tbody>
                  </table>
                </div>
            <script language="JavaScript" type="text/javascript">
var demoxx = document.getElementById("demoxx");
var demoxx1 = document.getElementById("demoxx1");
var demoxx2 = document.getElementById("demoxx2");

var speedxx=40
demoxx2.innerHTML=demoxx1.innerHTML
function Marquee11(){
if(demoxx2.offsetWidth-demoxx.scrollLeft<=0)
demoxx.scrollLeft-=demoxx1.offsetWidth
else{
demoxx.scrollLeft++
}
}
var MyMar11=setInterval(Marquee11,speedxx)
demoxx.onmouseover=function() {clearInterval(MyMar11)}
demoxx.onmouseout=function() {MyMar11=setInterval("Marquee11()",speedxx)}
            </script>  

转载请注明出处: www.tc711.com  QQ:187367103

      
            



更多的[原创]同一页面两个同时向左滚动代码操作方法请到论坛查看: http://BBS.TC711.COM



【 双击滚屏 】 【 评论 】 【 收藏 】 【 打印 】 【 关闭 】 来源: 互联网    日期:2012-9-27   

发 表 评 论
查看评论

  您的大名:
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款
认证编码: 刷新验证码
点评内容: 字数0
  精品推荐  
  本月推荐  
  友情赞助  

关于我们 | 联系我们 | 广告投放 | 留言反馈 | 免费程序 | 虚拟主机 | 网站建设 |  网站推广 |  google_sitemap baidu_sitemap RSS订阅
本站所有资源均来自互联网,如有侵犯您的版权或其他问题,请通知管理员,我们会在最短的时间回复您
Copyright © 2005-2015 Tc711.Com All Rights Reserved 版权所有·711网络   蜀ICP备05021915号
110网监备案 信息产业备案 不良信息举报