Home >Backend Development >PHP Tutorial >在php中,如何用 MSClass (Class Of Marquee Scroll通用不间断滚动JS封装类)

在php中,如何用 MSClass (Class Of Marquee Scroll通用不间断滚动JS封装类)

WBOY
WBOYOriginal
2016-06-23 14:08:291046browse

请教高手,我想做滚动效果,如何在php中用MSClass (Class Of Marquee Scroll通用不间断滚动JS封装类)
我看到网上(http://www.popub.net/script/MSClass.html)提供的都是asp得,现在我想从数据库中读出图片数据,
应该怎么做?


回复讨论(解决方案)

我自己写了一个,但是就是运行错误




<script></script>




<script> <br /> function $(id){return document.getElementById(id)}; <br /> </script>




 
 
   $sql="select f_images from user_info_input limit 30";
   $result=mysql_query($sql);
     while($row=mysql_fetch_array($result)){
echo "
    ";
    echo "
  • ";
    echo "在php中,如何用 MSClass (Class Of Marquee Scroll通用不间断滚动JS封装类)";
    echo "
  • ";
    echo "
"; 
  





<script> <br /> /*********DIV + CSS左右交替滚动、缓动、默认静止、跳过等待时间改变方向及样式切换实例(将第WaitTime设置成60000,则第DelayTime会起作用)***************/ <br /> var MarqueeDiv4Control = new Marquee( <br /> { <br /> MSClass : ["Movie_Box","still_scroll_container"], <br /> Direction : 4, <br /> Step : 0.1, <br /> Width : 729, <br /> Height : 70, <br /> Timer : 20, <br /> DelayTime : 3000, <br /> WaitTime : 100000, <br /> ScrollStep: 0, <br /> SwitchType: 0, <br /> AutoStart : true <br /> }); <br /> $("LeftButton4").onclick = function(){MarqueeDiv4Control.Run("Left")}; //跳过等待时间向左滚动 可以用MarqueeDiv4Control.Run(2)代替 <br /> $("RightButton4").onclick = function(){MarqueeDiv4Control.Run("Right")};//跳过等待时间向右滚动 <br /> $("RightButton4").className = "next over"; //将按钮置为不可点击(样式) <br /> MarqueeDiv4Control.OnBound = function() <br /> { <br /> if(MarqueeDiv4Control.Bound == 2) <br /> { <br /> $("LeftButton4").className = "prev over"; <br /> } <br /> else <br /> { <br /> $("RightButton4").className = "next over"; <br /> } <br /> }; //滚动至边界做相应处理,切换按钮状态(样式) <br /> MarqueeDiv4Control.UnBound = function() <br /> { <br /> $("RightButton4").disabled = $("LeftButton4").disabled = false; <br /> $("RightButton4").className = "next"; <br /> $("LeftButton4").className="prev"; <br /> }; //非边界状态处理 <br /> </script>
<script></script>


在线运行php的工具http://www.coderun.com/ide/

等待中,请高手指点

百度查查就行

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn