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> 跪求啊,这个jquery效果要怎样兼容ie6啊? get方式form表单提交,被截取了参数 一个页面要根据 url进行显示广告 该怎么写 谢谢 网页左右滚动图片新闻怎么做? javascript 如何实现对服务器控件操作? 请求大神帮助。。怎么把整个动态table的数据提交到后台 急救:怎么操作另一个框架页中的JAVASCRIPT函数!!!!在线等,急急急,明天要交项目:( 如何在网页中引用通过window.open打开的窗口中的对象 求数组的基础写法 怎么样制作一个飘动的图片 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>