JS如何实现弹出框回答问题 <a href="">公司</a>我想点击"公司"这个链接,然后就有一个弹出框,上面有问题,回答正确才能链接到相应的页面这个用JS如何实现? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 就是一个弹出层,正如楼上所说,用Jquery很好实现的,自己写,也就几行!给你个思路!<html xmlns="http://www.w3.org/1999/xhtml"><head> <title></title> <style type="text/css"> ul{list-style-type:none;} #cover{height:100%;width:100%;background:gray;position:absolute;top:0px;left:0px;display:none;filter:alpha(opacity=50);opacity:0.5;} #content{width:600px; height:100px; position:absolute;left:25%;top:25%;border:5px solid gray;display:none;background:white;} #content ul{height:20px;margin-top:0px;padding-right:5px;} #content ul li{float:right;cursor:pointer;width:50px;} </style> <script type="text/javascript"> function showCover() { document.getElementById("cover").style.display ="block"; document.getElementById("content").style.display="block"; } function hideCover() { document.getElementById("cover").style.display = "none"; document.getElementById("content").style.display = "none"; alert("您选择了关闭"); } </script></head><body> <input type="button" value="遮罩层" onclick="showCover();" /> <div id="cover" /> <div id="content"> <ul> <li onclick="hideCover()">[关闭]</li> <li onclick="hideCover()">[确定]</li> </ul> </div></body></html> 两个页面,值传递,jsp页面 请问框架里面的页面如何获取父窗口的高度? 如何取onClick的值! 关于 WebService(url,function(obj){},JSON.stringify(sendData)); webform , vb.net ,如何用javascript实现选中treeview某一结点,就选中其所有子结点? window.returnValue这一句的出处 弹出窗口的问题 能帮忙把这个XP按钮改写得简单点吗? 一个有挑战性的问题, 我想让文本框中的数字靠右显示,怎么写呢???什么属性?? jquery提交表单语法问题 js,真是祸害不浅。
<head>
<title></title>
<style type="text/css">
ul{list-style-type:none;}
#cover{height:100%;width:100%;background:gray;position:absolute;top:0px;left:0px;display:none;filter:alpha(opacity=50);opacity:0.5;}
#content{width:600px; height:100px; position:absolute;left:25%;top:25%;border:5px solid gray;display:none;background:white;}
#content ul{height:20px;margin-top:0px;padding-right:5px;}
#content ul li{float:right;cursor:pointer;width:50px;}
</style>
<script type="text/javascript">
function showCover() {
document.getElementById("cover").style.display ="block";
document.getElementById("content").style.display="block";
}
function hideCover() {
document.getElementById("cover").style.display = "none";
document.getElementById("content").style.display = "none";
alert("您选择了关闭");
}
</script>
</head>
<body>
<input type="button" value="遮罩层" onclick="showCover();" />
<div id="cover" />
<div id="content">
<ul>
<li onclick="hideCover()">[关闭]</li>
<li onclick="hideCover()">[确定]</li>
</ul>
</div>
</body>
</html>