走字程序 <marquee>hello world!</marquee> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <body> <div style="width:543px;height:21px;overflow:hidden" onMouseOver="stop()" onMouseOut="start()"> <table width="543" border="0" cellspacing="0" cellpadding="0" id="scrollimg" height="21"> <tr> <td id="simg"> <TABLE width="543" border="0" cellspacing="0" cellpadding="0" height="21"> <tr> <td><a href="index.htm">不间断文字滚动</a></td> </tr> </TABLE> </td> <td id="simg1"></td> </tr> </table> </div> <SCRIPT LANGUAGE="JavaScript"> var tm=null function newsScroll() { if(scrollimg.parentNode.scrollLeft!=(scrollimg.clientWidth/2)) scrollimg.parentNode.scrollLeft++; else scrollimg.parentNode.scrollLeft=0 } window.onload=function() { simg1.innerHTML=simg.innerHTML tm=setInterval('newsScroll()',20) } function stop() { clearInterval(tm) } function start() { tm=setInterval('newsScroll()',20) } </SCRIPT> </body> 沾到html文件里 就可以直接用 <div width="300" border="0" align="center" cellpadding="0" cellspacing="0"> <div id="marquees"> <div style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-collapse: collapse; border-right-width: 0px"> 阿斯顿发生大发 </div> </div></div><script language="JavaScript">marqueesHeight=130;stopscroll=false;with(marquees){ style.width=0; style.height=marqueesHeight; style.overflowX="visible"; style.overflowY="hidden"; noWrap=true; onmouseover=new Function("stopscroll=true"); onmouseout=new Function("stopscroll=false");}document.write('<div id="templayer" style="position:absolute;z-index:1;visibility:hidden"></div>');preTop=0; currentTop=0; function init(){ templayer.innerHTML=""; while(templayer.offsetHeight<marqueesHeight){ templayer.innerHTML+=marquees.innerHTML; } marquees.innerHTML=templayer.innerHTML+templayer.innerHTML; setInterval("scrollUp()",30);}document.body.onload=init;function scrollUp(){ if(stopscroll==true) return; preTop=marquees.scrollTop; marquees.scrollTop+=1; if(preTop==marquees.scrollTop){ marquees.scrollTop=templayer.offsetHeight-marqueesHeight; marquees.scrollTop+=1; }}</script> 额,忘记说了,我是用winform编的...应该怎么写呀... C#.net ajaxpro 的AjaxMethod的方法中能不能使用response对象 像csdn bbs这样,问题的背景色灰白交替显示,用css怎么做 asp.net 建立站点出错!帮帮忙,您会万福的噢! 请教关于两个Web Project之间身份验证问题 关于DataGrid控件问题. 有关页面刷新问题? 怎么办啊? srcElement是一个什么属性? 有没有什么好的实例书推荐? EXCEL与SQL导入导出 gridview中我创建了CheckBoxField ,但不可选,请问怎样设置才能在页面修改这个CheckBoxField 请问一个VB.NET中DATAGRID查询的问题
<div style="width:543px;height:21px;overflow:hidden" onMouseOver="stop()" onMouseOut="start()">
<table width="543" border="0" cellspacing="0" cellpadding="0" id="scrollimg" height="21">
<tr>
<td id="simg">
<TABLE width="543" border="0" cellspacing="0" cellpadding="0" height="21">
<tr>
<td><a href="index.htm">不间断文字滚动</a></td>
</tr>
</TABLE>
</td>
<td id="simg1"></td>
</tr>
</table>
</div>
<SCRIPT LANGUAGE="JavaScript">
var tm=null
function newsScroll() {
if(scrollimg.parentNode.scrollLeft!=(scrollimg.clientWidth/2))
scrollimg.parentNode.scrollLeft++;
else
scrollimg.parentNode.scrollLeft=0
}
window.onload=function() {
simg1.innerHTML=simg.innerHTML
tm=setInterval('newsScroll()',20)
}
function stop()
{
clearInterval(tm)
}
function start()
{
tm=setInterval('newsScroll()',20)
}
</SCRIPT>
</body>
<div id="marquees">
<div style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px;
border-collapse: collapse; border-right-width: 0px">
阿斯顿发生大发
</div>
</div>
</div><script language="JavaScript">marqueesHeight=130;
stopscroll=false;with(marquees){
style.width=0;
style.height=marqueesHeight;
style.overflowX="visible";
style.overflowY="hidden";
noWrap=true;
onmouseover=new Function("stopscroll=true");
onmouseout=new Function("stopscroll=false");
}
document.write('<div id="templayer" style="position:absolute;z-index:1;visibility:hidden"></div>');preTop=0; currentTop=0; function init(){
templayer.innerHTML="";
while(templayer.offsetHeight<marqueesHeight){
templayer.innerHTML+=marquees.innerHTML;
}
marquees.innerHTML=templayer.innerHTML+templayer.innerHTML;
setInterval("scrollUp()",30);
}
document.body.onload=init;function scrollUp(){
if(stopscroll==true) return;
preTop=marquees.scrollTop;
marquees.scrollTop+=1;
if(preTop==marquees.scrollTop){
marquees.scrollTop=templayer.offsetHeight-marqueesHeight;
marquees.scrollTop+=1;
}
}
</script>