哪位大侠在我这代码基础上 帮小弟实现下 图片轮播 特效啊!什么特效都行 渐变之类的都行!感激不尽啊!
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/...
<!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; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">
var imgArray = new Array(3);
imgArray[0]= "1.jpg";
imgArray[1]= "2.jpg";
imgArray[2]= "3.jpg";
var num=0;
function changeimg(){
var changetime = 5000;
var count = imgArray.length;
if (num>=count)
{
num = 0;
}
document.getElementById("imgdemo").src=imgArray[num];
num++;
setTimeout(changeimg,changetime);
}
</script>
</head>
<body onload="changeimg();">
<div style="background-color:#CCC" align="center" height=300px; width=200px>Hisoft
<img id="imgdemo" align="middle" style="background:#666 height=250px width=180px" />
</div>
</body>
</html> 展开
"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; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">
var imgArray = new Array(3);
imgArray[0]= "1.jpg";
imgArray[1]= "2.jpg";
imgArray[2]= "3.jpg";
var num=0;
function changeimg(){
var changetime = 5000;
var count = imgArray.length;
if (num>=count)
{
num = 0;
}
document.getElementById("imgdemo").src=imgArray[num];
num++;
setTimeout(changeimg,changetime);
}
</script>
</head>
<body onload="changeimg();">
<div style="background-color:#CCC" align="center" height=300px; width=200px>Hisoft
<img id="imgdemo" align="middle" style="background:#666 height=250px width=180px" />
</div>
</body>
</html> 展开
2个回答
2010-09-29
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询