鼠标悬停图片变大

2019-04-15 16:12发布

function resize_img1() { var pic = document.all.img1; var oldWidth = pic.width; var oldHeight = pic.height; var newWidth = 100; var newHeight = 100; pic.width = newWidth; pic.height = newHeight; pic.onmouseover = function () { this.width = oldWidth; this.height = oldHeight; }; pic.onmouseout = function () { this.width = newWidth; this.height = newHeight; }; }