请问怎么实现点击按钮后在网页中间出现一张图片(第2层,类似于登陆的悬浮框) 现在用JS做了一个拼图的网页应用 ,网页中间是拼图的主界面有一个东西不知道怎么实现,就是有一个“查看原图”的按钮点击后,会出现第二层,中间显示当前拼图的原图片其实就是类似于大多数网站的“登陆的悬浮框”请问如何实现有类似的代码可以给我参考吗?谢谢了。。! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!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=utf-8" /> <title></title> </head> <body> <div style="width:1002px; height:500px; background:#000; margin:0 auto; color:#fff; font-size:22px;">底下的拼图<input type="button" value="显示原图按钮" id="btn" /></div> <div id="show" style="width:200px; display:none; height:200px; position:absolute; left:200px; top:200px; z-index:111; background:#fff; font-size:22px;">显示原图弹出框</div> </body> <script> document.getElementById('btn').onclick = function(){ document.getElementById('show').style.display = 'block'; }; </script></html> <script> document.getElementById('btn').onclick = function(){ document.getElementById('show').style.display = 'block'; }; </script> 哪写错了 JQ,错了该怎么写? Google web地图和web卫星地图位置偏差,如何解决 flexigrid 中的方法如何调用??? Jquery选不中下拉菜单中的已选项,请大家帮忙! JS文件怎么调用另一个JS文件里的函数? 有没有办法屏蔽document.write button的onclick事件怎么没反应呢? 立结,怎样图片提交表单? 一个疑难问题,js如何改变某不确定id的内容 当页面用浏览器打开时,同时打开一个新的页面?请高手指教 相当棘手的问题,求解啊! 在form表单里有多个div,判断隐藏与显示
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title> </head> <body>
<div style="width:1002px; height:500px; background:#000; margin:0 auto; color:#fff; font-size:22px;">底下的拼图<input type="button" value="显示原图按钮" id="btn" /></div>
<div id="show" style="width:200px; display:none; height:200px; position:absolute; left:200px; top:200px; z-index:111; background:#fff; font-size:22px;">显示原图弹出框</div>
</body>
<script>
document.getElementById('btn').onclick = function(){
document.getElementById('show').style.display = 'block';
};
</script>
</html>
document.getElementById('btn').onclick = function(){
document.getElementById('show').style.display = 'block';
};
</script>