图片无缝滚动代码(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
相关文档:
浏览器对象
浏览器对象就是网页和浏览器本身各种实体元素在JavaScript程序中的体现。这样的浏览器对象主要包括以下几个
● Navigator:管理者当前使用浏览器的版本号、运行的平台以及浏览器使用的语言等信息。
● Windows对象:处于整个从属表的最顶级位置。每一个这样的对象代表一个浏览 ......
Dojo
一个强大的面向对象javascript框架。
主要由三大模块组成:Core、Dijit、DojoX。
Core提供 Ajax,events,packaging,CSS-based querying,animations,JSON等相关操作API。
Dijit ......
1. javascript 是区分大小写的,包括变量、函数名等等。
2. javascript 中的变量是弱类型的,定义变量时只用 var 运算符。
var test1 = "hi";
或者
var test1 = "hi",test2 = "hello";
或者(可以是不同的类型)
var test1 = "hi",test2 = 12;
或者(可以不用初始化)
var test1;
3. javascript 每条语句的结尾&ldqu ......
* {
margin:0;
padding:0;
font-size:13px;
*font-size:11px;
font-family:Verdana, Arial, 宋体,Helvetica, sans-serif;
/*scrollbar-face-color:#dff9fe;
scrollbar-highlight-color:#FFFFFF;
scrollbar-3dlight-color:#9adae7;
scrollbar-darkshadow-co ......
文字自动使用样式
.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 ......