juery框架写的弹窗效果适合新手

本人新手写点代码有点村,希望大家多多包含!!!!!!

复制代码 代码如下:


<html>
<head>
<title>js弹窗效果</title>
<meta http-equiv="content-type" content="text/html charset=gb2312">
<script language="javascript" src="https://www.jb51.net/jquery-1.4.js"></script>
</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></div>
<input type="button" value="点击">
<div>
<div><spanstyle="width:30px;height:30px;border:1px solid blue;background:black;float:right;"></span></div>
</div>
<table>
<tr>
<td>haha</td>
</tr>
</table>
</body>
</html>


如果对你有帮助也算没有白白上传!!!!!!(需要了解jquery框架)

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wdwfsz.html