账号通
    

账号  

密码  

144983

查看

231

回复
主题:[原创]焦点幻灯FLASH图片轮换循环语句终级解决方案 [收藏主题] 本贴被认定为精华 转到:  
pdh2008 当前离线

6

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:271 分
登录次数:4 次
注册时间:2009/3/5
最后登录:2009/3/13
pdh2008 发表于:2009/3/5 16:34:00   | 显示全部帖子 查看该作者主题 楼主 
科汛在线网校系统

高手,非常好。

我想做个SQL标签,效果的主要代码如下,请帮忙一下,谢谢!!

 

 

<div>
<div onmousedown=goright() style="DISPLAY: inline; BACKGROUND: url(http://i3.sinaimg.cn/edu/deco/2007/0924/career/job_mj_069.gif) no-repeat 11px 0px; FLOAT: left; MARGIN: 25px 0px 0px; OVERFLOW: hidden; WIDTH: 19px; CURSOR: pointer; HEIGHT: 52px"></div>
<div id=demo style="FLOAT: left; OVERFLOW: hidden; WIDTH: 150px; HEIGHT: 100px">
  <table cellPadding=0 align=left border=0 cellspace="0">
    <tr>
      <td id=demo1 vAlign=top><img src="{$GetInstallDir}admin/img/png-0015.png"><img src="{$GetInstallDir}admin/img/png-0018.png"><img src="{$GetInstallDir}admin/img/png-1056.png"><img src="{$GetInstallDir}admin/img/png-1058.png"><img src="{$GetInstallDir}admin/img/png-1059.png"><img src="{$GetInstallDir}admin/img/png-10885.png"></td>
      <td id=demo2 vAlign=top><img src="{$GetInstallDir}admin/img/png-0015.png"><img src="{$GetInstallDir}admin/img/png-0018.png"><img src="{$GetInstallDir}admin/img/png-1056.png"><img src="{$GetInstallDir}admin/img/png-1058.png"><img src="{$GetInstallDir}admin/img/png-1059.png"><img src="{$GetInstallDir}admin/img/png-10885.png"></td>
    </tr>
  </table>
</div>
<div onmousedown=goleft() style="DISPLAY: inline; BACKGROUND: url(http://i3.sinaimg.cn/edu/deco/2007/0924/career/job_mj_069.gif) no-repeat -8px 0px; FLOAT: left; MARGIN: 25px 0px 0px; OVERFLOW: hidden; WIDTH: 20px; CURSOR: pointer; HEIGHT: 52px"></div></div>
<SCRIPT>
var speed=30
var MoveTimeObj;
var MyMar;
demo2.innerHTML=demo1.innerHTML
demo.scrollLeft=demo.scrollWidth
function Marqueeright()
{
 if(demo.scrollLeft<=0)
  demo.scrollLeft+=demo2.offsetWidth
 else{
  demo.scrollLeft--
  }
}
function Marqueeleft(){
 if(demo2.offsetWidth-demo.scrollLeft<=0)
  demo.scrollLeft-=demo1.offsetWidth
 else{
  demo.scrollLeft++
  }
}
function MoveRight()
{
 MyMar=setInterval(Marqueeright,30)
 demo.onmouseover=function() {clearInterval(MyMar)}
 demo.onmouseout=function() {MyMar=setInterval(Marqueeright,30)}
}
function MoveLeft()
{
 MyMar=setInterval(Marqueeleft,speed)
 demo.onmouseover=function() {clearInterval(MyMar)}
 demo.onmouseout=function() {MyMar=setInterval(Marqueeleft,speed)}
}
function goright()
{
   clearInterval(MyMar);
   MoveRight();
}
function goleft()
{
 clearInterval(MyMar);
 MoveLeft();
}
</SCRIPT>

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
pdh2008 当前离线

6

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:271 分
登录次数:4 次
注册时间:2009/3/5
最后登录:2009/3/13
pdh2008 发表于:2009/3/5 16:27:00   | 显示全部帖子 查看该作者主题 沙发 
科汛在线网校系统

我也想自己写一个关于图片的SQL标签

      就是能够控制向左和向右滚动的无缝图片滚动效果要怎么写,请多多帮助。

 

 

这个是代码

 

 

 

<div>
<div onmousedown=goright() style="DISPLAY: inline; BACKGROUND: url(http://i3.sinaimg.cn/edu/deco/2007/0924/career/job_mj_069.gif) no-repeat 11px 0px; FLOAT: left; MARGIN: 25px 0px 0px; OVERFLOW: hidden; WIDTH: 19px; CURSOR: pointer; HEIGHT: 52px"></div>
<div id=demo style="FLOAT: left; OVERFLOW: hidden; WIDTH: 150px; HEIGHT: 100px">
  <table cellPadding=0 align=left border=0 cellspace="0">
    <tr>
      <td id=demo1 vAlign=top><img src="{$GetInstallDir}admin/img/png-0015.png"><img src="{$GetInstallDir}admin/img/png-0018.png"><img src="{$GetInstallDir}admin/img/png-1056.png"><img src="{$GetInstallDir}admin/img/png-1058.png"><img src="{$GetInstallDir}admin/img/png-1059.png"><img src="{$GetInstallDir}admin/img/png-10885.png"></td>
      <td id=demo2 vAlign=top><img src="{$GetInstallDir}admin/img/png-0015.png"><img src="{$GetInstallDir}admin/img/png-0018.png"><img src="{$GetInstallDir}admin/img/png-1056.png"><img src="{$GetInstallDir}admin/img/png-1058.png"><img src="{$GetInstallDir}admin/img/png-1059.png"><img src="{$GetInstallDir}admin/img/png-10885.png"></td>
    </tr>
  </table>
</div>
<div onmousedown=goleft() style="DISPLAY: inline; BACKGROUND: url(http://i3.sinaimg.cn/edu/deco/2007/0924/career/job_mj_069.gif) no-repeat -8px 0px; FLOAT: left; MARGIN: 25px 0px 0px; OVERFLOW: hidden; WIDTH: 20px; CURSOR: pointer; HEIGHT: 52px"></div></div>
<SCRIPT>
var speed=30
var MoveTimeObj;
var MyMar;
demo2.innerHTML=demo1.innerHTML
demo.scrollLeft=demo.scrollWidth
function Marqueeright()
{
 if(demo.scrollLeft<=0)
  demo.scrollLeft+=demo2.offsetWidth
 else{
  demo.scrollLeft--
  }
}
function Marqueeleft(){
 if(demo2.offsetWidth-demo.scrollLeft<=0)
  demo.scrollLeft-=demo1.offsetWidth
 else{
  demo.scrollLeft++
  }
}
function MoveRight()
{
 MyMar=setInterval(Marqueeright,30)
 demo.onmouseover=function() {clearInterval(MyMar)}
 demo.onmouseout=function() {MyMar=setInterval(Marqueeright,30)}
}
function MoveLeft()
{
 MyMar=setInterval(Marqueeleft,speed)
 demo.onmouseover=function() {clearInterval(MyMar)}
 demo.onmouseout=function() {MyMar=setInterval(Marqueeleft,speed)}
}
function goright()
{
   clearInterval(MyMar);
   MoveRight();
}
function goleft()
{
 clearInterval(MyMar);
 MoveLeft();
}
</SCRIPT>

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行5.65039秒 powered by KesionCMS 9.0