日期:2014-05-16 浏览次数:20434 次
<div style="width:760px;height:72px;background-image:url('images/event_banner_normal.png');"> <span> </span> <span id='event' style='height:72px;line-height:72px;font-size:25px;font-family:幼圆;font-weight:bold;' valign='middle'> </span> <span> </span> </div>
$.get("../api/hifapi.class.php?type=event","",function(data,textStatus){ var obj=eval("("+data+")"); for(var i=0;i<obj.length;i++) { $li=obj[i].title; } });
var position=0,revol=9,speed=10; function theforever_knight_go() { $('event').html(theforever_knight.substring(position, position + 160)); if(position++ == theforever_knight.length) { if(revol-- < 2) return; position = 0; } id = setTimeout("theforever_knight_go()", 2000 / speed); } var theforever_knight=""; $.get("../api/hifapi.class.php?type=event","",function(data,textStatus){ var obj=eval("("+data+")"); for(var i=0;i<obj.length;i++) { theforever_knight+=obj[i].title; } $('event').html(theforever_knight); theforever_knight_go(); });
------解决方案--------------------
div标签,代码如下所示:
<div style="width:760px;height:72px;background-image:url('images/event_banner_normal.png');"> <h1 class="event"></h1> </div>