<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>文档</title>
<style type='text/css'>
</style>
<script language="javascript" type="text/javascript">
<!--
/********************************/
/* 文字自动循环滚动 */
/********************************/
//scrollBodyId: String 内部滚动div的id
//scrollBoxId: String 外面限制div的id
//showHeight: Int 限制显示高度
//showWidth: Int 限制显示宽度
//lineHeight: Int 每行的高度
//stopTime: Int 间隔停止的时间(毫秒)
//speed: Int 滚动速度(毫秒,越小越快)
var ScrollObj = function(scrollBodyId,scrollBoxId,showHeight,showWidth,lineHeight,stopTime,speed) {
this.obj = document.getElementById(scrollBodyId);
this.box = document.getElementById(scrollBoxId);
this.style = this.obj.style;
this.defaultHeight = this.obj.offsetHeight;
this.obj.innerHTML += this.obj.innerHTML;
this.obj.style.position = "relative";
this.box.style.height = showHeight;
this.box.style.width = showWidth;
this.box.style.overflow = "hidden";
this.scrollUp = doScrollUp;
this.stopScroll = false;
this.curLineHeight = 0;
this.lineHeight = lineHeight;
this.curStopTime = 0;
this.stopTime = stopTime;
this.speed = speed;
this.style.top = lineHeight;
this.object = scrollBodyId + "Object";
eval(this.object + "=this");
setInterval(this.object+".scrollUp()",speed);
this.obj.onmouseover=new Function(this.object+".stopScroll=false");
this.obj.onmouseout=new Function(this.object+".stopScroll=false");
}
function doScrollUp(){
if( this.stopScroll == true )
return;
this.curLineHeight += 1;
if( this.curLineHeight >= this.lineHeight ){
this.curStopTime += 1;
if( this.curStopTime >= this.stopTime ){
this.curLineHeight = 0;
this.curStopTime = 0;
}
}
else{
this.style.top = parseInt(this.style.top) - 1;
if( -parseInt(this.style.top) >= this.defaultHeight ){
this.style.top = 0;
}
}
}
//***************这以上不要修改******************
//
</script>
</head>
<body class="f" scroll=no topmargin="0" leftmargin="0" bottommargin="0" rightmargin="0">
<table align="center" style="border:none; " cellpadding="0" cellspacing="0" width="100%" height="80%">
<tr><td>
<div id="scroollBox" style="height:80%; " align="center">
<div id="scroollBody">
<table align="center" cellpadding="0" cellspacing="0" style="border:none; " width="100%"><tr><td class="f">
Start KMUT---PQB
as<br>
asa<br>
sdas<br>
s<br>
dasd<br>
as<br>
sfsdfd<br>
End KMUT---PQB
</td></tr></table>
</div>
</div></td></tr></table>
<script language="javascript" type="text/javascript">
var w=document.body.clientWidth;
var h=document.body.clientHeight;
var sample = new ScrollObj("scroollBody","scroollBox",h,w,57,100,20);
</script>
</body>
</html>
C/S窗体显示HTML上下移动提示
需积分: 3 186 浏览量
2009-01-05
17:55:27
上传
评论
收藏 1.89MB RAR 举报
adrianEvin
- 粉丝: 22
- 资源: 11
最新资源
- 课程设计作业-SpringBoot企业产品仓库管理系统(文档 + 源码 + 数据库文件)
- python相关知识点说明
- 基于 STM32 实现交通灯控制程序源码+详细文档+全部资料(优秀项目).zip
- linux简介及基础教程及特点阐述.txt
- 数据结构课程设计课作业资料
- java简介及基础教程及特点阐述.txt
- 一个简单的数据分析脚本示例,它使用Python和pandas库来读取CSV文件、执行一些基本的数据清洗和转换,并进行简单的可视化
- AD7124+PT100 基于STM32f103的代码 检测多路温度(100~-200)并输出
- CHROME webdriver Version: 125.0.6422.78 win64
- python读取一个CSV文件,对数据进行一些基本的数据清洗和处理,然后进行可视化
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈