当前位置: 代码迷 >> Web前端 >> 鼠标挪动-图片放大
  详细解决方案

鼠标挪动-图片放大

热度:40   发布时间:2012-10-17 10:25:46.0
鼠标移动--图片放大
2011-05-23 01:07

<html>
?<head>
?</head>
?
?<body>
??<div align="center">
???<img src="2.jpg" width="200px" height=250px" id="image" onmouseover="showPicture()" onmouseout="showPicture1()">
??</div>
??<script type="text/javascript">
??? function showPicture(){
????document.getElementById("image").style.width="532px";
????document.getElementById("image").style.height="608px";
???}
???function showPicture1(){
????document.getElementById("image").style.width="200px";
????document.getElementById("image").style.height="250px";
???}
??</script>
??<script type="text/javascript">
//???document.getElementById("image").attachEvent("onmouseover",showPicture);
//???document.getElementById("image").attachEvent("onmouseout",showPicture1);
??</script>
?</body>
</html>

?

  相关解决方案