易截截图软件、单文件、免安装、纯绿色、仅160KB

JavaScript特效:间隔滚动图片

<!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>
<title>间隔滚动图片</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="Generator" content="Dreamweaver8" />
<meta name="Author" content="枫叶随风 QQ:455948725 E-mail:liukun615@126.com" />
<link rel="shortcut icon" href="http://www.fengyekun.com/favicon.ico" />
<style type="text/css">
<!--
body {font-family:"宋体", Arial, Helvetica, sans-serif; margin:0px; font-size:12px;}
h1 {margin:0px; height:95px; line-height:95px; color:#ff0000; text-align:center; font-size:20px; font-weight:bold;}
#main {width:100%;}
#content {position:relative; top:50%; margin:-150px auto; width:500px; height:300px; border:1px solid #999; background:#eee;}
#mydiv {margin:0px auto; width:120px; height:90px; border:10px solid #fff; white-space:nowrap; overflow:hidden;}
#mydiv img {width:120px; height:90px;}
#demo1,#demo2 {display:inline;}
-->
</style>
<script language="javascript">
var Tid;
function MarqueeImage(){
    var demo1 = document.getElementById("demo1");
    var demo2 = document.getElementById("demo2");
    var mydiv = document.getElementById("mydiv");
    var AreaWidth=120;  //这里的值要跟内容显示区域宽度一样,这里是跟显示的图片宽度一样。
    var Speed=10  //内容区域滚动的速度
 


相关文档:

JavaScript 获取对象的高度和宽度详细说明

scrollHeight: 获取对象的滚动高度。
scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离
scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离
scrollWidth:获取对象的滚动宽度
offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度
offsetL ......

JavaScript特效:弹出菜单

<!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;&n ......

JavaScript特效:页面停留时间

<script language="javascript" type="text/javascript">
var TempTime=new Date().getTime();
function StayTime(){
    var NowTime=new Date().getTime();
    var Time=NowTime-TempTime;
    var&nb ......

JavaScript特效:时间倒数

var Tid;
var SetTime=4*60*60*1000;  //设置毫秒数,1000毫秒为1秒
function LTime(){
    var MyDiv=document.getElementById("mydiv");
    var Time,TempTime,Days,Hours,Minutes,Seconds;
    
  &n ......

JavaScript特效:倒记时

function LTime(){
    var MyDiv=document.getElementById("mydiv");
    var TempTime=new Date("2050/01/01").getTime();
    var NowTime=new Date().getTime();
    var NowTime=TempTime-N ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号