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="CopyRight" content="版权所有 枫叶随风" />
<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 {width:480px; height:110px; overflow:hidden; border:10px solid #fff;}
#mydiv table td {text-align:center;}
#demo1 {width:480px; height:110px;}
#demo1,#demo2 {vertical-align:top;}
#demo1 img,#demo2 img {padding-right:10px; width:120px; height:90px; border:none;}
#demo1 a,#demo2 a {display:block; margin-top:5px;}
-->
</style>
<script language="javascript">
var Tid;
function MarqueeImage(Direction){
var speed=20;
var demo1 = document.getElementById("demo1");
var demo2 = do
相关文档:
scrollHeight: 获取对象的滚动高度。
scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离
scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离
scrollWidth:获取对象的滚动宽度
offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度
offsetL ......
  ......
1、直接在前台调用 javascript 函数
很简单,在 head 元素之间加入 script 元素,将 type 元素设置为 " text/javascript "
如:
<head runat="server">
<mce:script type="text/javascript" ><!--
function ShowName(str)
{
alert("您的名字为:("+str+")");
}
// --></mce:script>
< ......
ECMA 本周推出了 JavaScript 5(PDF),除了增强基础函数库之外,还引入了严格运行时模式(Strict Runtime Modes)以避免代码中的常见错误。ECMA ECMAScript 4 的努力曾以失败告终,ECMA 甚至没有发布 ECMAScript 4 细则。
过去几年,诸如 Nitro,TraceMonkey 一类的 JavaScript 引擎发展迅猛,JavaScript 成了 Google Wa ......
1.document.write( " "); 输出语句
2.JS中的注释为//
3.传统的HTML文档顺序是:document- >html- >(head,body)
4.一个浏览器窗口中的DOM顺序是:window- >(navigator,screen,history,location,document)
5.得到表单中元素的名称和值:document.getElementById( "表单中元素的ID號 ").name(或value)
6 ......