如何实现轮换的文字广告?
如何实现轮换的文字广告?谢谢各位
------解决方案--------------------发一段JS代码
<script language= "JavaScript " type= "text/javascript ">
<!--
var i = 0;
//****显示消息编号
var TextNumber = -1;
//****显示消息内容
var TextInput = new Object();
//****帮助信息
var HelpText= " ";
var Text = " ";
//****5秒自动显示
var Speed=50;
var m=-0;
var addPadding= "\r\n ";
var TotalTextInput;
//*****输出显示消息内的内容
var count= <%=GGXXDT.Rows.Count%> ;
TextInput[0] = ' <%=GetGGXXLZ(0)%> ';
TextInput[1] = ' <%=GetGGXXLZ(1)%> ';
TextInput[2] = ' <%=GetGGXXLZ(2)%> ';
TextInput[3] = ' <%=GetGGXXLZ(3)%> ';
TotalTextInput = count <=4?count:4;// </div>
var speed=2000
var MyMar=setInterval( "Message(m++) ",speed)
sohu.onmouseover=function(){clearInterval(MyMar)}
sohu.onmouseout=function(){MyMar=setInterval( "Message(m++) ",speed)}
document.all( "left1_tt ").onmouseover=function() {clearInterval(MyMar)}
document.all( "left1_tt ").onmouseout=function() {MyMar=setInterval( "Message(m++) ",speed)}
//*****点击按钮显示相应的消息信息
function Message(i)
{
//****没有数据时就退出
if(document.all( "esh ")==null) return;
var j=i%TotalTextInput;
sohu.innerHTML=TextInput[j];
for(var s=0;s <esh.length;s++)
{
esh[s].innerHTML= " <img src=images/ "+ (s+1)+ ".jpg border=0/> ";
}
if (esh.length> 1)
{
esh[j].innerHTML= " <img src=images/a "+ (j+1)+ ".jpg border=0/> ";
}
}
//****结束日期不能小于开始日期
function SeachChecked()
{
if(document.all( "Left1_txtStateDate ").value> document.all( "Left1_txtEndDate ").value)
{
alert( "开始日期不能大于结束日期,请重新选择! ");
return false;
}
return true;
}
//-->
</script>