<div id=demo style="overflow:hidden;width:574px;border:0px solid #e0e0e0;padding:2px;" onmouseover="stopscroll();" onmouseout="doscroll()"><div id="demo1" style="white-space:nowrap;padding:0;">
<%dim i
sql="Select x_id,x_suoluetu_xiao,x_biaoti from xinwen where x_fenlei=42 order by x_id desc"
call ljsjk()
%>
<a href="xinwen.asp?id=1070" target="_blank"><img src="tupian/03.jpg"width="300" height="104"  border="0"/></a>
<a href="xinwen.asp?id=1006" target="_blank"><img src="tupian/003.jpg"width="200" height="104" border="0" /></a>
<a href="xinwen.asp?id=1001" target="_blank"><img src="tupian/02.jpg"width="300" height="104" border="0" /></a>
</div>
<script language="JavaScript" type="text/javascript">
var t=demo.scrollWidth
demo1.innerHTML+=demo1.innerHTML
function doMarquee()
{
demo.scrollLeft=demo.scrollLeft<demo.scrollWidth+demo.offsetWidth?demo.scrollLeft+1:t-demo.offsetWidth
}
function doscroll()
{
   sc=setInterval(doMarquee,20)
}
function stopscroll()
{
   clearInterval(sc)
}
doscroll()
</script>

解决方案 »

  1.   

    能向左了肯定可以向右了FF下估计得下JS吧,IE下一个标记搞顶。
      

  2.   


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> New Document </TITLE><SCRIPT LANGUAGE="JavaScript">
    <!--
    var Lefts = "left";
    var stat = 10;
    //来回走
    function show() {
    var curLeft = document.getElementById("picId").style.pixelRight;
    var maxLeft = document.body.offsetWidth - document.getElementById("picId").offsetWidth;
    if (curLeft <= 0) {
    Lefts = "right";
    } else if (curLeft >= maxLeft) {
    Lefts = "left";
    } if (Lefts == "left") {
    curLeft = curLeft - stat;
    } else if (Lefts == "right") {
    curLeft = curLeft + stat;
    } document.getElementById("picId").style.pixelRight = curLeft; setTimeout("show()",100); }
    //像左走
    function showDown() {
    var curLeft = document.getElementById("picId").style.pixelLeft;
    var maxLeft = document.body.offsetWidth - document.getElementById("picId").offsetWidth;
    if (curLeft <= 0) {
    curLeft = 0;
    }
    if (Lefts == "left") {
    curLeft = curLeft - stat;

    document.getElementById("picId").style.pixelLeft = curLeft; setTimeout("showDown()",100); }//-->
    </SCRIPT></HEAD><BODY onLoad="showDown()">
    <img src="images/pic01.jpg" id="picId" style="position:absolute;Left:1000px;">
    </BODY>
    </HTML>
      

  3.   


    //像右走
    function showDown() {
    var curLeft = document.getElementById("picId").style.pixelLeft;
    var maxLeft = document.body.offsetWidth - document.getElementById("picId").offsetWidth;
    if (curLeft <= 0) {
    curLeft = 0;
    }
    if (Lefts == "right") {
    curLeft = curLeft + stat;

    document.getElementById("picId").style.pixelLeft = curLeft; setTimeout("showDown()",100); }