<style type="text/css"> #imgFrame{ position:absolute; top:30%; left:40%; z-index:1000; display:none;} </style> <script type="text/javascript"> function showOriginal(img,e) { //鼠标x坐标
// document.getElementById("imgFrame").style.top = mousePos(e).x; //鼠标Y坐标
// document.getElementById("imgFrame").style.left = mousePos(e).y; // document.getElementById("imgFrame").style.zIndex=1000; // document.getElementById("imgFrame").style.position = "absolute"; document.getElementById("imgFrame").style.display = "block"; document.getElementById("imgbox").innerHTML = "<img src='" + img + "' />"; } function close() { document.getElementById("imgFrame").style.display = "none"; } //获取鼠标坐标 function mousePos(e){ var x,y; var e = e||window.event; return { x:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft, y:e.clientY+document.body.scrollTop+document.documentElement.scrollTop }; }; function test(e)
{
document.getElementById("mjs").innerHTML = mousePos(e).x+','+mousePos(e).y;
}; </script>
<img src='<%#Eval("picture")%>' width="100" height="50" onclick="showOriginal('<%#Eval("picture")%>',event);">
<div id="test" style="1000px;height:1000px;background:#ccc;" onmousemove="test(event)"></div>