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

javascript图片切换效果/带文字

纯图片版:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Slideshow</title>

<mce:script type="text/javascript" charset="utf-8"><!--
var galleryarray = ['dog.gif','cat.gif','penguin.gif'];
var curimg=0;
function rotateimages(){

document.getElementById("slideshow").setAttribute("src","img/"+galleryarray[curimg])
//document.getElementById("slideshow").src="img/"+galleryarray[curimg]
curimg=(curimg<galleryarray.length-1)?curimg+1:0
}
window.onload=function(){
setInterval("rotateimages()",2500)
}

// --></mce:script>
</head>
<body>
<div style="width:170px;height:160px;border:4px solid #e2e2e2;margin:0 auto;">
<img id="slideshow" src="img/cat.gif" mce_src="img/cat.gif">
</div>

</div>
</body>
</html>
图片+文字说明
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Slideshow</title>

<mce:script type="text/javascript" charset="utf-8"><!--

var galleryarray =
['dog.gif|dog','cat.gif|cat','penguin.gif|penguin'];
var curimg=0;
function rotateimages(){

document.getElementById("slideshow").setAttribute("src","img/"+galleryarray[curimg].split("|")[0])
document.getElementById("showTxt").innerHTML=galleryarray[curimg].split("|")[1];
//document.getElementById("slideshow").src="img/"+galleryarray[curimg]
curimg=(cu


相关文档:

JavaScript常用方法总结——一些函数

根据身份证号码取得生日与性别,并判断18位身份证的正确与错误:
function showBirthday(val){
var birthdayValue;
if(15==val.length){//15位身份证号码
birthdayValue = val.charAt(6)+val.charAt(7);
if(parseInt(birthdayValue)<10){
birthdayValue = '20'+birthdayValue;
}else{
birthdayValue = '1 ......

JavaScript常用方法总结——判断浏览器类型

判断浏览器类型
<SCRIPT language=javascript>
if(navigator.appVersion.indexOf("MSIE 6.") != -1 ){
window.location = "111.htm" ;
}
</SCRIPT>
按钮背景图片替换
<input type=button style="background-image:url(a.gif)" value=test onmouseover="this.style.backgroundImage='url(b.gif ......

JavaScript 初级教程

在数百万张页面中,JavaScript 被用来改进设计、验证表单、检测浏览器、创建cookies,等等等等。
JavaScript 是因特网上最流行的脚本语言,并且可在所有主要的浏览器中运行,比方说 Internet Explorer、 Mozilla、Firefox、Netscape、和 Opera。
什么是 JavaScript?
JavaScript 被设计用来向 HTML 页面添加交互行为。 ......

JavaScript中的window对象

window对象:每一个该对象代表一个浏览器窗口
1.常用方法如下
      open("要打开的页面文件名","打开窗口在操作系统中的名称(任何名称都可以)",
               "toolbar=?,menubar=?,top=?,left=?,width=?,height=?" ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号