弹出一个对话框,底下页面变灰色技术是怎么实现的 是js + div + css 实现的 你可以去下载 ext 那里面有很多那样的功能 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ext是什么?不好意思我不太懂.能说详细点吗? JK的代码........<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>JK:支持民族工业,尽量少买X货</title></head><body style="margin:0;"><div style="font-size:10pt;">注1:灰掉页面<br/> <br/> 注:本页面仅在IE6下测试过。其它浏览器或其它版本未经测试。<br/> 注-----:JK:<a href="mailTo:[email protected]?subject=About Body">[email protected]</a><br/> <hr/> </div><select><option >test</option></select><input> <input type=button value="点击将页面灰掉" onclick="disableBodyArea();"> <br><br><br><br><br><br><br><br><select><option >test</option></select><br><br><br><br><br><br><br><br><select><option >test</option></select><br><br><br><br><br><br><br><br></body></html><script >function disableBodyArea(){ if(!document.all) return false;//For firefox etc. window.topCoverDiv=document.createElement("<div style='z-index:100;position:absolute;top:expression(this.offsetParent.scrollTop);left:expression(this.offsetParent.scrollLeft);width:100%;height:100%;filter:alpha(opacity=20);background-color:#888888;' oncontextmenu='return false;'>"); topCoverDiv.innerHTML=" " document.body.appendChild(topCoverDiv); var allSelects=document.getElementsByTagName("select"); for(var i=0;i<allSelects.length;i++) { allSelects[i].disabled=true; allSelects[i].style.backgroundColor="#EEEEEE"; }}</script> lightbox这个有下载的也有说明教你怎么用 4楼的代码只能在ie6中可以哦,在firefox中就不行了哦还有想要弹出对话框的,完整的代码谁有哦?不过还是谢谢啦lightbox 这是什么? 给个我用的给你看看<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title></title></head><body style="margin:0;"><select><option >test</option></select><input> <input type=button value="点击将页面灰掉" onclick="disableBodyArea();"> <br><br><br><br><br><br><br><br><select><option >test</option></select><br><br><br><br><br><br><br><br><select><option >test</option></select><br><br><br><br><br><br><br><br></body></html><script>//这里初始化遮盖面的,使用IFRAMEwindow.onload=function() { var iframe=document.createElement("iframe"); iframe.id=""; iframe.style.display='none'; iframe.style.position='absolute'; iframe.style.top='0px'; iframe.style.left='0px'; iframe.style.margin='0px'; iframe.style.width='100%'; iframe.style.height='100%'; iframe.style.backgroundColor='#666666'; iframe.style.zIndex=100; iframescrolling="no"; iframe.frameborder="0"; if(document.all)//ie iframe.style.filter="Alpha(opacity=60)"; else iframe.style.opacity="0.6"; document.body.appendChild(iframe); }function disableBodyArea(){ document.getElementById("").style.display=""}</script> 已经找到一个好的。大家想学习的看看这个网址吧。http://www.blueidea.com/download/product/2007/5182.asp都有详细讲的谢谢各位啦! 不如用下我的试一试,这可是我经常用的一种...效果还不错<html> <head> <title>LIGHTBOX EXAMPLE</title> <style> .black_overlay{ display: none; position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; background-color: black; z-index:1001; -moz-opacity: 0.8; opacity:.80; filter: alpha(opacity=80); } .white_content { display: none; position: absolute; top: 25%; left: 25%; width: 50%; height: 50%; padding: 16px; border: 16px solid orange; background-color: white; z-index:1002; overflow: auto; } </style> </head> <body> <p><a href="http://www.nextcool.cn" target="_blank">NextCool</a>收集整理,可以根据自己要求修改css样式<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">点击这里打开窗口</a></p> <div id="light" class="white_content">This is the lightbox content. <a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">Close</a></div> <div id="fade" class="black_overlay"></div> </body></html> JavaScript 常用函数 有关复选框的问题 二级联动下拉框,请教高手指点 帮忙优化一个正则式 小妹求助关于dhtmlxtree的右键菜单 javascript 显示即时时间 新手请教 ie提示语法错误,但是在其他浏览器没错 实现能从下拉菜单里选择,也能手工输入,关键还要能选择下拉的多项,该如何实现? 引号里面的引号如何表示? js显示层 EcmaScript正則表達式( 深入淺出系列之淺出 ^_^ )
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>JK:支持民族工业,尽量少买X货</title>
</head><body style="margin:0;"><div style="font-size:10pt;">
注1:灰掉页面<br/> <br/>
注:本页面仅在IE6下测试过。其它浏览器或其它版本未经测试。<br/>
注-----:JK:<a href="mailTo:[email protected]?subject=About Body">[email protected]</a><br/>
<hr/>
</div>
<select><option >test</option></select>
<input>
<input type=button value="点击将页面灰掉" onclick="disableBodyArea();">
<br><br><br><br>
<br><br><br><br>
<select><option >test</option></select>
<br><br><br><br>
<br><br><br><br>
<select><option >test</option></select>
<br><br><br><br>
<br><br><br><br>
</body></html>
<script >function disableBodyArea(){
if(!document.all) return false;//For firefox etc.
window.topCoverDiv=document.createElement("<div style='z-index:100;position:absolute;top:expression(this.offsetParent.scrollTop);left:expression(this.offsetParent.scrollLeft);width:100%;height:100%;filter:alpha(opacity=20);background-color:#888888;' oncontextmenu='return false;'>");
topCoverDiv.innerHTML=" "
document.body.appendChild(topCoverDiv);
var allSelects=document.getElementsByTagName("select");
for(var i=0;i<allSelects.length;i++) {
allSelects[i].disabled=true;
allSelects[i].style.backgroundColor="#EEEEEE";
}
}</script>
这个有下载的
也有说明教你怎么用
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
</head><body style="margin:0;">
<select><option >test</option></select>
<input>
<input type=button value="点击将页面灰掉" onclick="disableBodyArea();">
<br><br><br><br>
<br><br><br><br>
<select><option >test</option></select>
<br><br><br><br>
<br><br><br><br>
<select><option >test</option></select>
<br><br><br><br>
<br><br><br><br>
</body></html>
<script>
//这里初始化遮盖面的,使用IFRAME
window.onload=function()
{
var iframe=document.createElement("iframe");
iframe.id="";
iframe.style.display='none';
iframe.style.position='absolute';
iframe.style.top='0px';
iframe.style.left='0px';
iframe.style.margin='0px';
iframe.style.width='100%';
iframe.style.height='100%';
iframe.style.backgroundColor='#666666';
iframe.style.zIndex=100;
iframescrolling="no";
iframe.frameborder="0";
if(document.all)//ie
iframe.style.filter="Alpha(opacity=60)";
else
iframe.style.opacity="0.6";
document.body.appendChild(iframe);
}
function disableBodyArea(){
document.getElementById("").style.display=""
}</script>
都有详细讲的
谢谢各位啦!
<head>
<title>LIGHTBOX EXAMPLE</title>
<style>
.black_overlay{
display: none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index:1001;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
.white_content {
display: none;
position: absolute;
top: 25%;
left: 25%;
width: 50%;
height: 50%;
padding: 16px;
border: 16px solid orange;
background-color: white;
z-index:1002;
overflow: auto;
}
</style>
</head>
<body>
<p><a href="http://www.nextcool.cn" target="_blank">NextCool</a>收集整理,可以根据自己要求修改css样式<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">点击这里打开窗口</a></p>
<div id="light" class="white_content">This is the lightbox content. <a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">Close</a></div>
<div id="fade" class="black_overlay"></div>
</body>
</html>