图片无缝滚动代码(DIV+CSS+JavaScript)
<div id="imgbox" style="height:110px;width:600px;overflow:hidden;">
<div id="imgbox1" style="float:left;width:1000%">
<img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif">
<img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif">
<img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif">
<img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif">
<img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif">
<img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif">
<img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif">
<img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif">
<img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif">
<img src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif" mce_src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.gif">
</div>
<div id="imgbox2" style="float:left" mce_style="float:left"></div>
</div>
<mce:script type="text/javascript"><!--
var speed=30;
var imgbox=document.getElementById("imgbox");
var imgbox1=document.getElementById("imgbox1");
var imgbox2=document.getElementById("imgbox2");
imgbox2.innerHTML=imgbox1.innerHTML;
function Marquee(){
if(imgbox2.offsetWidth-imgbox.scrollLeft<=0)
imgbox.scrollLe
相关文档:
stringObject.substring(start,end);
函数方法将返回一个包含从 start 到最后(不包含 end )的子字符串的字符串.
start 必需。一个非负的整数,规定要提取的子串的第一个字符在 stringObject 中的位置.
stop 可选。一个非负的整数,比要提取的子串的最后一个字符在 stringObject ......
1. javascript 是区分大小写的,包括变量、函数名等等。
2. javascript 中的变量是弱类型的,定义变量时只用 var 运算符。
var test1 = "hi";
或者
var test1 = "hi",test2 = "hello";
或者(可以是不同的类型)
var test1 = "hi",test2 = 12;
或者(可以不用初始化)
var test1;
3. javascript 每条语句的结尾&ldqu ......
第三章 对象基础
在javaScript中,对象是无特定顺序的值的数组。
一、对象的类型
分为本地对象、内置对象和宿主对象三种,其中内置对象也属于本地对象。
二、本地对象:
1、Array类,数组类。
  ......
文字自动使用样式
.inputText{
border:1px solid #7898b8;
height:20px;
padding-left:2px;
line-height:20px;
background-image:url(images\\inputtext_bg.gif);
background-repeat:repeat-x;
color:#339900;
}
.inputText是 字体自动设置样式的名称
各种控件自动套用样式
比如table,td
table{border-colla ......
/*
*创建人:蔺宜忠
*用途:学习css,应用于新闻系统
*/
*
{
/*把默认值设置为0*/
margin: 0;
padding: 0;
border-width: 0;
}
body
{
font-size: 14px;
}
a:link,a:visited
{
/*鼠 ......