漂亮的jquery提示效果(仿騰訊彈出層)
更新時(shí)間:2013年02月05日 09:38:28 作者:
jquery提示效果有很多,本文也提供一個(gè)超漂亮的仿騰訊彈出層效果,熱愛特效的你可千萬不要錯(cuò)過了啊,希望本文提供的案例對(duì)你學(xué)習(xí)jquery特效有所幫助
復(fù)制代碼 代碼如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>超漂亮的仿騰訊彈出層效果</title>
<style>
body {background: #ffffff; color: #444;}
a{color: #09d; text-decoration: none;border: 0;background-color: transparent;}
body,div,q,iframe,form,h5{margin: 0;padding: 0;}
img,fieldset { border: none 0; }
body,td,textarea {word-break: break-all;word-wrap: break-word; line-height:1.5;}
body,input,textarea,select,button { margin: 0; font-size: 12px; font-family: Tahoma, SimSun, sans-serif;}
div,p,table,th,td { font-size:1em; font-family:inherit; line-height:inherit;}
h5{ font-size:12px;}
</style>
<script type="text/javascript" src="Dialog.js"></script>
<script type="text/javascript">
function zOpenD(){
var diag = new Dialog("Diag1");
diag.Width = 900;
diag.Height = 400;
diag.Title = "彈出窗口示例";
diag.URL = "http://www.html.org.cn/";
diag.ShowMessageRow = true;
diag.MessageTitle = "彈出窗口示例";
diag.Message = "在這兒你可以對(duì)這個(gè)窗口的內(nèi)容或功能作一些說明";
diag.OKEvent = zAlert;//點(diǎn)擊確定后調(diào)用的方法
diag.show();
}
function zOpen(){
var diag = new Dialog("Diag2");
diag.Width = 900;
diag.Height = 400;
diag.Title = "彈出窗口示例";
diag.URL = "http://www.html.org.cn/";
diag.OKEvent = zAlert;//點(diǎn)擊確定后調(diào)用的方法
diag.show();
}
function zOpenInner(){
var diag = new Dialog("Diag3");
diag.Width = 300;
diag.Height = 100;
diag.Title = "彈出窗口示例";
diag.innerHTML='<div style="text-align:center">直接輸出html,使用dialog.<b>innerHTML</b>。</div>'
diag.OKEvent = function(){diag.close();};//點(diǎn)擊確定后調(diào)用的方法
diag.show();
}
function zOpenEle(){
var diag = new Dialog("Diag4");
diag.Width = 300;
diag.Height = 100;
diag.Title = "彈出窗口示例";
diag.innerElementId="forlogin"
diag.OKEvent = function(){$E.getTopLevelWindow().$("username").value||alert("用戶名不能為空");$E.getTopLevelWindow().$("userpwd").value||alert("密碼不能為空")};//點(diǎn)擊確定后調(diào)用的方法
diag.show();
}
function zAlert(){
Dialog.alert("你點(diǎn)擊了一個(gè)按鈕");
}
function zConfirm(){
Dialog.confirm('警告:?',function(){Dialog.alert("");});
}
</script>
</head>
<body>
<h3 align="center"><a > </a></h3>
<div id="div1"></div>
<p> <input type="button" value="彈出新窗口" onclick="zOpen()" /> <input type="button" value="彈出帶說明的新窗口" onclick="zOpenD()" /> <input type="button" value="彈出信息提示對(duì)話框" onclick="zAlert()" /> <input type="button" value="彈出選擇對(duì)話框" onclick="zConfirm()" /> <input type="button" value="彈出內(nèi)容為HTML代碼" onclick="zOpenInner()" /> <input type="button" value="彈出內(nèi)容為本頁面內(nèi)的隱藏層" onclick="zOpenEle()" /></p>
<div id="div2"></div>
<div id="forlogin"><table width="100%" border="0" align="center" cellpadding="4" cellspacing="4" bordercolor="#666666">
<tr>
<td colspan="2" bgcolor="#eeeeee">用戶登陸</td>
</tr>
<tr>
<td width="50" align="right">用戶名</td>
<td>
<input type="text" id="username" /></td>
</tr>
<tr>
<td align="right">密 碼</td>
<td>
<input type="text" id="userpwd" /> </td>
</tr>
</table></div>
<br/>
<script>sometext("div1",200);sometext("div2",200);</script>
</body>
</html>
效果圖:

您可能感興趣的文章:
- jQuery實(shí)現(xiàn)選中彈出窗口選擇框內(nèi)容后賦值給文本框的方法
- jQuery獲取選中內(nèi)容及設(shè)置元素屬性的方法
- 基于jQuery的輸入框在光標(biāo)位置插入內(nèi)容, 并選中
- jQuery實(shí)現(xiàn)頁面點(diǎn)擊后退彈出提示框的方法
- jQuery實(shí)現(xiàn)鼠標(biāo)經(jīng)過彈出提示信息的地圖熱點(diǎn)效果
- Jquery中國地圖熱點(diǎn)效果-鼠標(biāo)經(jīng)過彈出提示層信息的簡(jiǎn)單實(shí)例
- jquery刪除提示框彈出是否刪除對(duì)話框
- Jquery實(shí)現(xiàn)鼠標(biāo)移上彈出提示框、移出消失思路及代碼
- 基于jquery的彈出提示框始終處于窗口的居中位置(類似于alert彈出框的效果)
- 基于jQuery的彈出警告對(duì)話框美化插件(警告,確認(rèn)和提示)
- jquery div提示框漸隱彈出與隱藏效果
- jQuery實(shí)現(xiàn)鼠標(biāo)選中文字后彈出提示窗口效果【附demo源碼】
相關(guān)文章
jquery動(dòng)態(tài)加載select下拉框示例代碼
動(dòng)態(tài)加載select下拉框的實(shí)現(xiàn)方法有很多,在接下來的文章中為大家介紹下jquery是如何實(shí)現(xiàn)的2013-12-12jQuery+css實(shí)現(xiàn)的tab切換標(biāo)簽(兼容各瀏覽器)
這篇文章主要介紹了jQuery+css實(shí)現(xiàn)的tab切換標(biāo)簽,可兼容各瀏覽器,涉及jQuery響應(yīng)鼠標(biāo)事件動(dòng)態(tài)操作頁面元素的相關(guān)技巧,需要的朋友可以參考下2016-01-01jquery $(document).ready() 與window.onload的區(qū)別
Jquery中$(document).ready()的作用類似于傳統(tǒng)JavaScript中的window.onload方法,不過與window.onload方法還是有區(qū)別的。2009-12-12jQuery中noconflict函數(shù)的實(shí)現(xiàn)原理分解
這篇文章主要介紹了jQuery中noconflict函數(shù)的實(shí)現(xiàn)原理分解,noconflict是用來防止變量沖突的,本文就分解了它的實(shí)現(xiàn)原理,并分析了它的實(shí)現(xiàn)源碼,需要的朋友可以參考下2015-02-02