< html xmlns = " http://www.w3.org/1999/xhtml " > < head > < title > Untitled Page </ title > < script type = " text/javascript " > // JScript 文件 // ******* // 鼠标移入显示大图片 // ******* function yiru(t) { var ei = document.getElementById("big_image"); ei.style.display = "block"; ei.style.position="relative"; ei.innerHTML = '<img src="' + t.src + '" width="150px" height="150px" />'; ei.style.top =event.clientY+"px"; ei.style.left =event.clientX+"px"; } // ******* // 鼠标移出隐藏大图片 // ******* function yichu() { var ei = document.getElementById("big_image"); ei.style.display = "none"; } </ script > </ head > < body > < img src = " ../imges/dl.png " onmouseover = " yiru(this) " onmouseout = " yichu() " /> < div id = " big_image " style = " display:none " ></ div > </ body > </ html > 转载于:https://www.cnblogs.com/di305449473/archive/2008/07/23/1249291.html