超链接缩略图预览
作者:Java伴侣 日期:2007-11-13
<SCRIPT LANGUAGE="JavaScript">
<!--
var width = 300; //设置层 宽
var height = 300; // 设置层 高
function init(){
document.all.im.width = width;
document.all.im.height = height;
}
function a( e ){
document.all.im.src = e.src;
document.all.d.style.left = event.x;
document.all.d.style.top = event.y;
document.all.d.style.display = "";
}
function b(){
document.all.d.style.left = 0;
document.all.d.style.top = 0;
document.all.d.style.display = "none";
}
//-->
</SCRIPT>
<BODY onload="init()">
<input type="image" width=100 height=100 src="d:\My Documents\My Pictures\景色6.jpg" onMousemove="a(this)" onmouseout="b()">
<input type="image" width=100 height=100 src="d:\My Documents\My Pictures\景色7.jpg" onMousemove="a(this)" onmouseout="b()">
<input type="image" width=100 height=100 src="d:\My Documents\My Pictures\景色8.jpg" onMousemove="a(this)" onmouseout="b()">
<div id="d" style="position:absolute;left=0;top=0;display:none;border: 1px #FF00FF solid;" >
<input id="im" type="image">
</div>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]