求小图看大图JS,弹出大图必须在区域内(有图有代码) 求小图看大图JS,弹出大图必须在区域内(有图有代码) 详细内容:http://bbs.blueidea.com/thread-2991366-1-1.html 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我这儿有一段代码,你看看能用不<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title></head><body><style>#demo{overflow:hidden;width:120px;text-align:center;padding:10px;}#demo img{border:none;width:100px;height:100px;border:5px solid #f4f4f4}#openlayer{position:absolute;display:none;z-index:2;border:50px solid #f4f4f4}</style><div id="demo" style="overflow:hidden;width:120px;text-align:center;padding:10px"> <img src="bianyaqizhujiexian1.PNG" width="135" height="531" _fcksavedurl="http://www.bnxb.com/uploads/allimg/c091113/125P9441PW0-13335.jpg" /></div><div id="openlayer"></div><script>var demo = document.getElementById("demo");var gg = demo.getElementsByTagName("img");var ei = document.getElementById("openlayer");for(i=0; i<gg.length; i++){ var ts = gg[i]; ts.onmousemove = function(event){ event = event || window.event; ei.style.display = "block"; ei.innerHTML = '<img src="' + this.src + '" />'; ei.style.top = document.body.scrollTop + event.clientY + 10 + "px"; ei.style.left = document.body.scrollLeft + event.clientX + 10 + "px"; } ts.onmouseout = function(){ ei.innerHTML = ""; ei.style.display = "none"; } ts.onclick = function(){ window.open( this.src ); }}</script></body></html> 能找到地址,就查看源代码或是用firebug去取 extJs难题 浏览器javscript文件加载机制问题 js中上下滚动字幕 tomcat的启动时有InvocationTargetException异常 不按Ctrl实现Multiple Select多选 JS传值问题 提交form时,怎么判断checkbox有没有被选中 如何实现在多帧之间鼠标拖动div层? 求一正则表达式 有什么办法能让程序控制(比如按钮点击后)在网页上依次播放两个MP3文件? createRange能截取多少文本内容? 使用Jquery ui layout布局问题,关闭myLayout.close('west');后再打开页面无法显示
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<style>
#demo{overflow:hidden;width:120px;text-align:center;padding:10px;}
#demo img{border:none;width:100px;height:100px;border:5px solid #f4f4f4}
#openlayer{position:absolute;display:none;z-index:2;border:50px solid #f4f4f4}
</style>
<div id="demo" style="overflow:hidden;width:120px;text-align:center;padding:10px"> <img src="bianyaqizhujiexian1.PNG" width="135" height="531" _fcksavedurl="http://www.bnxb.com/uploads/allimg/c091113/125P9441PW0-13335.jpg" /></div>
<div id="openlayer"></div>
<script>
var demo = document.getElementById("demo");
var gg = demo.getElementsByTagName("img");
var ei = document.getElementById("openlayer");
for(i=0; i<gg.length; i++){
var ts = gg[i];
ts.onmousemove = function(event){
event = event || window.event;
ei.style.display = "block";
ei.innerHTML = '<img src="' + this.src + '" />';
ei.style.top = document.body.scrollTop + event.clientY + 10 + "px";
ei.style.left = document.body.scrollLeft + event.clientX + 10 + "px";
}
ts.onmouseout = function(){
ei.innerHTML = "";
ei.style.display = "none";
}
ts.onclick = function(){
window.open( this.src );
}
}
</script>
</body>
</html>