jQuery實現(xiàn)單擊按鈕遮罩彈出對話框效果(2)
本文實例為大家分享了jQuery實現(xiàn)彈出對話框的具體實現(xiàn)代碼,供大家參考,具體內(nèi)容如下
首先,這里的引用jquery-1.4.4.min.js和jquery.XYTipsWindow.min.2.8.js這兩個js,還有一個jquery.XYTipsWindow.2.8.css話不多說,這里直接上代碼,留著以后備用。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標(biāo)題文檔</title>
<!--使用對畫框需要的兩個js-->
<script type="text/javascript" src="../js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../js/jquery.XYTipsWindow.min.2.8.js"></script>
<link href="../css/jquery.XYTipsWindow.2.8.css" rel="external nofollow" type="text/css" rel="stylesheet" />
<script type="text/javascript">
$(document).ready(function() {
$("#change").click(function(){
$.XYTipsWindow({
___title:"修改密碼",
___boxID:"change_pwd",
___content:"id:pwd",
___width:"200",
___height:"100",
___showbg:true,
___drag:"___boxTitle"
});
});
$("#no").click(function(){
//alert("ss");
$.XYTipsWindow.removeBox();
});
$("#ok").click(function(){
//alert("ss");
$.XYTipsWindow.removeBox();
//獲取input的值
//$(".newpwd").val()
});
})
</script>
</head>
<body style="text-align:center; padding-top:100px;">
<button id="change">修改密碼</button>
<div id="pwd"><div class="input"><input class="newpwd" value="請輸入" stylr="color:gray;" onfocus="javascript:if(this.value == '請輸入') this.value='';this.style.color='#00CCCC';"
onblur="javascript:if(this.value == '') this.value='請輸入';this.style.color='gray';"/></div>
<div class="button">
<input id="ok" type="button" value="確定"/>
<input id="no" type="button" value="取消"/>
</div>
</div>
<style type="text/css">
#pwd{
display:none;
}
.button{
margin-bottom:10px;
padding-top:10px;
}
.newpwd{
margin:10px;
border:1px thin;
}
</style>
</div>
</body>
</html>效果圖:

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
有關(guān)jquery與DOM節(jié)點操作方法和屬性記錄
下面小編就為大家?guī)硪黄嘘P(guān)jquery與DOM節(jié)點操作方法和屬性記錄。小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考2016-04-04
jquery實現(xiàn)側(cè)邊彈出的垂直導(dǎo)航
這篇文章主要介紹了jquery動畫特效結(jié)合css實現(xiàn)側(cè)邊彈出的垂直導(dǎo)航的方法及代碼分享,需要的朋友可以參考下2014-12-12
談?wù)凧query ajax中success和complete有哪些不同點
jquery ajax中success和complete有哪些不同點呢?大家都了解嗎,接下來通過本篇文章給大家介紹jquery ajax中success和complete的不同點,感興趣的朋友一起學(xué)習(xí)吧2015-11-11
Jquery.TreeView結(jié)合ASP.Net和數(shù)據(jù)庫生成菜單導(dǎo)航條
在網(wǎng)上瀏覽了許多關(guān)于利用Jquery.TreeView插件生成樹的例子!但是大多數(shù)都沒有結(jié)合數(shù)據(jù)庫來生成樹,很難運用到實際項目中!2010-08-08

