美图切换

来源:互联网 发布:通达信涨停公式源码 编辑:程序博客网 时间:2024/04/28 05:53

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312" />
<title>图片切换</title>
<script>
    functionBigpic(imgname)
 {
    //显示大图片
  document.getElementsByName(imgname)[0].style.width="500";
  document.getElementsByName(imgname)[0].style.height="900";
  //并且停止滚动  
 }
 function smallpic(imgname){
    //显示小图片
  document.getElementsByName(imgname)[0].style.width="150";
  document.getElementsByName(imgname)[0].style.height="200";
  //时间开始
 }
</script>
</head>

<body>
<marquee direction="left" scrolldelay="100"onmouseover="this.stop()"onmouseout="this.start()">
<img name="1.jpg" src="1.jpg" width="150"height="200" onmouseover="Bigpic('1.jpg')"onmouseout="smallpic('1.jpg')"/>
<img name="2.jpg" src="2.jpg" width="150"height="200" onmouseover="Bigpic('2.jpg')"onmouseout="smallpic('2.jpg')" />
<img name="3.jpg" src="3.jpg" width="150"height="200" onmouseover="Bigpic('3.jpg')"onmouseout="smallpic('3.jpg')" />
<img name="4.jpg" src="4.JPG" width="150"height="200" onmouseover="Bigpic('4.jpg')"onmouseout="smallpic('4.jpg')" />
<img name="5.jpg" src="5.jpg" width="150"height="200" onmouseover="Bigpic('5.jpg')"onmouseout="smallpic('5.jpg')" />
<img name="6.jpg" src="6.jpg" width="150"height="200" onmouseover="Bigpic('6.jpg')"onmouseout="smallpic('6.jpg')" />
<img name="6.jpg" src="7.jpg" width="150"height="200" onmouseover="Bigpic('7.jpg')"onmouseout="smallpic('7.jpg')" />
<img name="7.jpg" src="8.jpg" width="150"height="200" onmouseover="Bigpic('8.jpg')"onmouseout="smallpic('8.jpg')" />
</marquee>
</body>
</html>

0 0
原创粉丝点击