关于内容文字滚动的问题,高分相赠 —再问 syre(神仙)所说的,会出现1的问题,一开始是好的,但是滚动几次后就会出现错误了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这么复杂的效果,用flash好了 <script language="JavaScript">function Ptqyb(){//var tqyb="顺 德 天 气|少云到多云,偶有阵雨 |温度: 27~33℃ |风力:西南风,3级 |湿度:65~85%";//var strArray=tqyb.split('|');//mLen=strArray.length;//showId=0;//Math.floor(Math.random()*3);//tempStr=strArray[showId];//strArray[showId]=strArray[0];//strArray[0]=tempStr;document.write('<table width=100% border=0 cellspacing=0 cellpadding=0 align=center>'+'<tr><td width=350 align=center>'+'<span id="main2" style="position:relative;width:590;left:0;top:0" align=center>'+'<div id="toptable" style="position:absolute;width:590;left:0;top:0" align=center>'+'<table width=350 border=0 cellspacing=0 cellpadding=0 align=center>');//for(i=0;i<mLen;i++)// document.write('<tr CLASS="weather" height=21><td width=30% align=center>'+strArray[i]+'</td></tr>');document.write("<P>中国奥运健儿<br>在本届奥<br>运会中,<BR>奋勇拼搏<BR>取得了骄<br>人的成绩</P><P>难道不是吗<BR>你说是不是?</P>");document.write('</table>'+'</div>'+'</span>'+'</td></tr>'+'</table>');var t=84;marqueesHeight=t;stopscroll=false;toptable.scrollTop=0;with(toptable){ style.width=0; style.height=marqueesHeight; style.overflowX="visible"; style.overflowY="hidden"; noWrap=true; onmouseover=new Function("stopscroll=true"); onmouseout=new Function("stopscroll=false");}preTop=0; currentTop=t; stoptime=0;toptable.innerHTML+=toptable.innerHTML;init_srolltext(t);}function init_srolltext(t){ toptable.scrollTop=0; setInterval("scrollUp("+t+")",3);}function scrollUp(t){ if(stopscroll==true) return; currentTop+=1; if(currentTop==(t+1)) { stoptime+=1; currentTop -=1; if(stoptime==40) { currentTop=0; stoptime=0; } } else { preTop=toptable.scrollTop; toptable.scrollTop+=1; if(preTop==toptable.scrollTop){ toptable.scrollTop=(t*4); toptable.scrollTop+=1; } }}</script><style type="text/css">table{font-size:19px}</style><table border="1" height="85" cellpadding="0" cellspacing="0" width="80%" align="center"><tr><td height="85" bgcolor="#DFF0EE" valign="top" align="left"><script language="JavaScript">Ptqyb();</script></td></tr></table> ext4的combobox有没有办法用post提交选中值 关于dhtmlXTree的问题,做过异步加载节点的进 js获取来源页面URL 将字符串转换成对象: JS实现把选中单选按钮的值存入数组 firefox 不支持onmouseover里的函数带参数? 我修改了JS代码,怎样才能让它立即在打开的浏览器中生效?!烦死了 想要实现滚动菜单的功能,但是...... 初学cookie,有问题请教 谁自己做过select控件,因为确省的select太讨厌,老是在所有层的上方! js的对象回溯问题 关于内容文字滚动的问题,高分相赠 —三问
function Ptqyb()
{
//var tqyb="顺 德 天 气|少云到多云,偶有阵雨 |温度: 27~33℃ |风力:西南风,3级 |湿度:65~85%";//var strArray=tqyb.split('|');//mLen=strArray.length;
//showId=0;//Math.floor(Math.random()*3);
//tempStr=strArray[showId];
//strArray[showId]=strArray[0];
//strArray[0]=tempStr;
document.write('<table width=100% border=0 cellspacing=0 cellpadding=0 align=center>'
+'<tr><td width=350 align=center>'
+'<span id="main2" style="position:relative;width:590;left:0;top:0" align=center>'
+'<div id="toptable" style="position:absolute;width:590;left:0;top:0" align=center>'
+'<table width=350 border=0 cellspacing=0 cellpadding=0 align=center>');
//for(i=0;i<mLen;i++)
// document.write('<tr CLASS="weather" height=21><td width=30% align=center>'+strArray[i]+'</td></tr>');document.write("<P>中国奥运健儿<br>在本届奥<br>运会中,<BR>奋勇拼搏<BR>取得了骄<br>人的成绩</P><P>难道不是吗<BR>你说是不是?</P>");document.write('</table>'
+'</div>'
+'</span>'
+'</td></tr>'
+'</table>');var t=84;
marqueesHeight=t;stopscroll=false;
toptable.scrollTop=0;with(toptable){
style.width=0;
style.height=marqueesHeight;
style.overflowX="visible";
style.overflowY="hidden";
noWrap=true;
onmouseover=new Function("stopscroll=true");
onmouseout=new Function("stopscroll=false");
}preTop=0; currentTop=t; stoptime=0;
toptable.innerHTML+=toptable.innerHTML;init_srolltext(t);
}function init_srolltext(t){
toptable.scrollTop=0;
setInterval("scrollUp("+t+")",3);
}function scrollUp(t){
if(stopscroll==true) return;
currentTop+=1;
if(currentTop==(t+1))
{
stoptime+=1;
currentTop -=1;
if(stoptime==40)
{
currentTop=0;
stoptime=0;
}
}
else {
preTop=toptable.scrollTop;
toptable.scrollTop+=1;
if(preTop==toptable.scrollTop){
toptable.scrollTop=(t*4);
toptable.scrollTop+=1;
}
}}
</script>
<style type="text/css">
table{font-size:19px}
</style>
<table border="1" height="85" cellpadding="0" cellspacing="0" width="80%" align="center">
<tr><td height="85" bgcolor="#DFF0EE" valign="top" align="left">
<script language="JavaScript">
Ptqyb();
</script>
</td></tr>
</table>