太长了,懒得看。为何不用DreamWeaver那?
<marquee onMouseOver="this.stop()" onMouseOut="this.start()"〉
text</marquee>
<marquee onMouseOver="this.stop()" onMouseOut="this.start()"〉
text</marquee>
解决方案 »
- 这个RegExp的问题,关于验证输入的“日期、月份、年份”格式是否正确的疑惑!
- Flash和JS交互的问题
- EXTJS gridpanel 读取数据问题
- frame之间的传值问题?
- 谁有javascript的技术手册,或者教程(chm格式的最好)
- 急!急!急!新手请教javascript问题
- 如何动态添加text的属性???
- 为什么在javascript里面改的值在服务器端都不认呢?
- smzdm.com、tese.taobao.com中,文章列表里的“展开全文”是如何实现的
- 请教一个javascript效果。
- 关于在HTC中获取属性值时遇到的问题!
- 在网页中插入的flash怎样能播放一段时间自动关闭,就像以前csdn主页上的效果???
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>文字滚动</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<style type=text/css>
<!--
.myBoard {
position: absolute;
top: 50px;
left: 50px;
width: 200px;
height: 200px;
background-color: silver;
visibility: hidden;
clip: rect(0 0 0 0);
}
//-->
</style>
<script id=clientEventHandlersJS language=javascript>
<!--
var top = 50;
var left = 50;
var objs, objCurrent, objNew;
var i, j;
var ivlID, ivlsID;
var bRoll, bScroll, bWait;
bWait = false; //初始为非等待状态
objs = 2; //滚动块的块数
function window_onload() {
i = 1;
objCurrent = document.all.item("myBoard0" + i);
objNew = document.all.item("myBoard0" + (i+1));
objCurrent.style.clip = "rect(0 200 200 0)";
objCurrent.style.visibility = "visible";
bRoll = true; //开始等待变换
ivlID = window.setTimeout("roll()",2000);
}
function roll() {
window.clearTimeout(ivlID);
bRoll = false; //结束等待变换
j=0;
objNew.style.visibility = "visible";
bScroll = true; //开始滚动
ivlsID = window.setInterval("scroll();",18); //开始滚动
}
function scroll() {
objCurrent.style.clip = "rect(" + j + " 200 200 0)";
objCurrent.style.top = 50-j;
objNew.style.top = 250-j;
objNew.style.clip = "rect(0 200 " + j + " 0)";
j+=5;
if (j>200) {
window.clearInterval(ivlsID); //到达顶峰,滚动停止
bScroll = false; //滚动结束
objCurrent.style.visibility = "hidden";
i++; //到下一个对象
objCurrent = document.all.item("myBoard0" + i);
objNew = document.all.item("myBoard0" + (i+1));
if(i>=objs) {
i=0;
objNew = document.all.item("myBoard0" + (i+1));
}
bRoll = true; //开始等待变换
if(!bWait) {
ivlID = window.setTimeout("roll();",2000) //滚动结束,开始全局变换计时
}
}
}
function bmouseover() {
if(bRoll) {
window.clearTimeout(ivlID);
}else {
bWait = true;
}
}
function bmouseout() {
if(bRoll) {
ivlID = window.setTimeout("roll()",2000);
}else {
bWait = false;
}
}
//-->
</script>
</head>
<body language=javascript onload="return window_onload()">
<div id="myBoard01" class=myBoard onmouseover="bmouseover();" onmouseout="bmouseout();">
<table border=0 cellspacing=0 cellpadding=0 width=100% height=100%>
<tr>
<td bgcolor=#00ccff align=center>this is info one.</td>
</tr>
</table>
</div>
<div id="myBoard02" class=myBoard onmouseover="bmouseover();" onmouseout="bmouseout();">
<table border=0 cellspacing=0 cellpadding=0 width=100% height=100%>
<tr>
<td bgcolor="#cccc00" align=center>this is info two.</td>
</tr>
</table>
</div>
</body>
</html>