如何让父级的遮罩层也同时显示出来?
一个页面用了iframe窗口,窗口引用了一个网页,网页中有一个人弹窗和遮罩层,但是遮罩层只在iframe窗口出现,很不美观,所以我在主页面也做了一个遮罩层,但是不知道如何...
一个页面用了iframe窗口,窗口引用了一个网页,网页中有一个人弹窗和遮罩层,但是遮罩层只在iframe窗口出现,很不美观,所以我在主页面也做了一个遮罩层,但是不知道如何在激活引用页面遮罩层的同时也将父级也就是iframe所在的页面遮罩层也激活
展开
1个回答
展开全部
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<script type="text/javascript" src="jquery.blockUI.js"></script>
<script type="text/javascript">
<!--
function submitForm(){
var username=$("#username").val();
$.ajax({
type: "POST",
url: "checkuser.php",
data: "username=" + username,
success: function(data) {
$.blockUI({
message: "<img src='${ctx}/image/loading.gif' /><h4><strong>数据正在查询中,请稍后....</strong></h4>"
,css: { background: 'none', color: '#000',border:'none' }
,overlayCSS: {backgroundColor: '#C5E1F0',opacity:'0.4'}
});
} ,
error: function(data) {
$.blockUI({
message: "<img src='${ctx}/image/loading.gif' /><h4><strong>错误</strong></h4>"
,css: { background: 'none', color: '#000',border:'none' }
,overlayCSS: {backgroundColor: '#C5E1F0',opacity:'0.4'}
});
}
});
}
//-->
</script>
</head>
<body>
<form id="myform" method="post" action="">
<input type="text" name="username" id="username" />
<input type="button" value="提交" onclick="submitForm()"/>
</form>
</body>
</html>
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<script type="text/javascript" src="jquery.blockUI.js"></script>
<script type="text/javascript">
<!--
function submitForm(){
var username=$("#username").val();
$.ajax({
type: "POST",
url: "checkuser.php",
data: "username=" + username,
success: function(data) {
$.blockUI({
message: "<img src='${ctx}/image/loading.gif' /><h4><strong>数据正在查询中,请稍后....</strong></h4>"
,css: { background: 'none', color: '#000',border:'none' }
,overlayCSS: {backgroundColor: '#C5E1F0',opacity:'0.4'}
});
} ,
error: function(data) {
$.blockUI({
message: "<img src='${ctx}/image/loading.gif' /><h4><strong>错误</strong></h4>"
,css: { background: 'none', color: '#000',border:'none' }
,overlayCSS: {backgroundColor: '#C5E1F0',opacity:'0.4'}
});
}
});
}
//-->
</script>
</head>
<body>
<form id="myform" method="post" action="">
<input type="text" name="username" id="username" />
<input type="button" value="提交" onclick="submitForm()"/>
</form>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询