富贵资源网 Design By www.hznty.com
本人新手写点代码有点村,希望大家多多包含!!!!!!
复制代码 代码如下:
<html>
<head>
<title>js弹窗效果</title>
<meta http-equiv="content-type" content="text/html charset=gb2312">
<script language="javascript" src="/UploadFiles/2021-04-02/jquery-1.4.js"></head>
<script language="javascript">
//document.body.offsetWidth="512px";
function mina(){
$("#dv").css("display","block");
var a = $(document).height();
var b = $(window).width();
var h =$(window).height();
f = (b-300)/2;
d =(h-300)/2;
$("#dv").css("margin-top",d);
$("#dv").css("margin-left",f);
$("#zhezhao").toggle();
$("#zhezhao").css("width",b);
$("#zhezhao").css("height",a);
}
function nin(){
$("#dv").css("display","none");
$("#zhezhao").toggle();
}
</script>
<body>
<div style="display:none;position:absolute;z-index:100;background:#ccc" id="zhezhao"></div>
<input type="button" value="点击" onclick="mina()">
<div id="dv" style="width:300px;height:300px;border:1px solid red;display:none;position:absolute;z-index:1000;background:white;">
<div><span id="ss"style="width:30px;height:30px;border:1px solid blue;background:black;float:right;" onclick="nin()"></span></div>
</div>
<table align="center" border="1" width="888" height="668">
<tr>
<td align="center">haha</td>
</tr>
</table>
</body>
</html>
如果对你有帮助也算没有白白上传!!!!!!(需要了解jquery框架)
复制代码 代码如下:
<html>
<head>
<title>js弹窗效果</title>
<meta http-equiv="content-type" content="text/html charset=gb2312">
<script language="javascript" src="/UploadFiles/2021-04-02/jquery-1.4.js"></head>
<script language="javascript">
//document.body.offsetWidth="512px";
function mina(){
$("#dv").css("display","block");
var a = $(document).height();
var b = $(window).width();
var h =$(window).height();
f = (b-300)/2;
d =(h-300)/2;
$("#dv").css("margin-top",d);
$("#dv").css("margin-left",f);
$("#zhezhao").toggle();
$("#zhezhao").css("width",b);
$("#zhezhao").css("height",a);
}
function nin(){
$("#dv").css("display","none");
$("#zhezhao").toggle();
}
</script>
<body>
<div style="display:none;position:absolute;z-index:100;background:#ccc" id="zhezhao"></div>
<input type="button" value="点击" onclick="mina()">
<div id="dv" style="width:300px;height:300px;border:1px solid red;display:none;position:absolute;z-index:1000;background:white;">
<div><span id="ss"style="width:30px;height:30px;border:1px solid blue;background:black;float:right;" onclick="nin()"></span></div>
</div>
<table align="center" border="1" width="888" height="668">
<tr>
<td align="center">haha</td>
</tr>
</table>
</body>
</html>
如果对你有帮助也算没有白白上传!!!!!!(需要了解jquery框架)
富贵资源网 Design By www.hznty.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
富贵资源网 Design By www.hznty.com
暂无评论...