juery框架寫(xiě)的彈窗效果適合新手
更新時(shí)間:2013年11月27日 17:33:06 作者:
彈窗效果想必大家都有見(jiàn)到過(guò)吧,在本文將為大家介紹下使用juery框架來(lái)寫(xiě)個(gè)適合新手學(xué)習(xí)的彈窗效果
本人新手寫(xiě)點(diǎn)代碼有點(diǎn)村,希望大家多多包含?。。。。?!
<html>
<head>
<title>js彈窗效果</title>
<meta http-equiv="content-type" content="text/html charset=gb2312">
<script language="javascript" src="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 style="display:none;position:absolute;z-index:100;background:#ccc" id="zhezhao"></div>
<input type="button" value="點(diǎn)擊" 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>
如果對(duì)你有幫助也算沒(méi)有白白上傳?。。。。。。ㄐ枰私鈐query框架)
復(fù)制代碼 代碼如下:
<html>
<head>
<title>js彈窗效果</title>
<meta http-equiv="content-type" content="text/html charset=gb2312">
<script language="javascript" src="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 style="display:none;position:absolute;z-index:100;background:#ccc" id="zhezhao"></div>
<input type="button" value="點(diǎn)擊" 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>
如果對(duì)你有幫助也算沒(méi)有白白上傳?。。。。。。ㄐ枰私鈐query框架)
相關(guān)文章
jquery處理頁(yè)面彈出層查詢(xún)數(shù)據(jù)等待操作實(shí)例
這篇文章主要介紹了jquery處理頁(yè)面彈出層查詢(xún)數(shù)據(jù)等待操作,實(shí)例分析了jquery實(shí)現(xiàn)等待效果的技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-03-03
JQuery彈出炫麗對(duì)話(huà)框的同時(shí)讓背景變灰色
這篇文章主要介紹JQuery實(shí)現(xiàn)彈出炫麗對(duì)話(huà)框的同時(shí)讓背景變灰色效果,需要的朋友可以參考下2014-05-05
jQuery實(shí)現(xiàn)點(diǎn)擊按鈕文字變成input框點(diǎn)擊保存變成文字
這篇文章主要介紹了jQuery實(shí)現(xiàn)點(diǎn)擊按鈕文字變成input框點(diǎn)擊保存變成文字的相關(guān)資料,非常具有參考借鑒價(jià)值,需要的朋友可以參考下2016-05-05
使用jQuery調(diào)用XML實(shí)現(xiàn)無(wú)刷新即時(shí)聊天
這篇文章主要介紹了使用jQuery調(diào)用XML實(shí)現(xiàn)無(wú)刷新即時(shí)聊天的相關(guān)資料,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下2016-08-08
jquery+ajaxform+springboot控件實(shí)現(xiàn)數(shù)據(jù)更新功能
這篇文章主要介紹了jquery+ajaxform+springboot控件實(shí)現(xiàn)數(shù)據(jù)更新操作,使用jquery的ajaxform插件是一個(gè)比較不錯(cuò)的選擇。具體實(shí)現(xiàn)工程大家參考下本文2018-01-01

