摘要:漂亮的jquery提示效果(仿腾讯弹出层)代码如下:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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,p,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;} p,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 = "https://www.html.org.cn/"; diag.ShowMessageRow = true; diag.MessageTitle = "弹出窗口示例"; diag.Message = "在这儿你可以对这个窗口的内容或功能作一些说明"; diag.OKEvent = zAlert;//点击确定后调用的方法 diag.show(); } function zOpen(){ var diag = new Dialog("Diag2"); diag.Width = 900; diag.Height = 400; diag.Title = "弹出窗口示例"; diag.URL = "https://www.html.org.cn/"; diag.OKEvent = zAlert;//点击确定后调用的方法 diag.show(); } function zOpenInner(){ var diag = new Dialog("Diag3"); diag.Width = 300; diag.Height = 100; diag.Title = "弹出窗口示例"; diag.innerHTML='<p style="text-align:center">直接输出html,使用dialog.<b>innerHTML</b>。</p>' diag.OKEvent = function(){diag.close();};//点击确定后调用的方法 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("密码不能为空")};//点击确定后调用的方法 diag.show(); } function zAlert(){ Dialog.alert("你点击了一个按钮"); } function zConfirm(){ Dialog.confirm('警告:?',function(){Dialog.alert("");}); } </script> </head> <body> <h3 align="center"><a href="https://www.html.org.cn/"> </a></h3> <p id="p1"></p> <p> <input type="button" value="弹出新窗口" onclick="zOpen()" /> <input type="button" value="弹出带说明的新窗口" onclick="zOpenD()" /> <input type="button" value="弹出信息提示对话框" onclick="zAlert()" /> <input type="button" value="弹出选择对话框" onclick="zConfirm()" /> <input type="button" value="弹出内容为HTML代码" onclick="zOpenInner()" /> <input type="button" value="弹出内容为本页面内的隐藏层" onclick="zOpenEle()" /></p> <p id="p2"></p> <p 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></p> <br/> <script>sometext("p1",200);sometext("p2",200);</script> </body> </html>

脚本宝典收集整理的这篇文章主要介绍了

js实例教程-漂亮的jquery提示效果(仿腾讯弹出层)

脚本宝典小编觉得挺不错的,现在分享给大家,也给大家做个参考,希望能帮助你少写一行代码,多一份安全和惬意。

小宝典致力于为广大程序猿(媛)提供高品质的代码服务,请大家多多光顾小站,小宝典在此谢过。

漂亮的jquery提示效果(仿腾讯弹出层)代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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,p,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;}
p,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 = "https://www.html.org.cn/";
diag.ShowMessageRow = true;
diag.MessageTitle = "弹出窗口示例";
diag.Message = "在这儿你可以对这个窗口的内容或功能作一些说明";
diag.OKEvent = zAlert;//点击确定后调用的方法
diag.show();
}
function zOpen(){
var diag = new Dialog("Diag2");
diag.Width = 900;
diag.Height = 400;
diag.Title = "弹出窗口示例";
diag.URL = "https://www.html.org.cn/";
diag.OKEvent = zAlert;//点击确定后调用的方法
diag.show();
}
function zOpenInner(){
var diag = new Dialog("Diag3");
diag.Width = 300;
diag.Height = 100;
diag.Title = "弹出窗口示例";
diag.innerHTML='<p style="text-align:center">直接输出html,使用dialog.<b>innerHTML</b>。</p>'
diag.OKEvent = function(){diag.close();};//点击确定后调用的方法
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("密码不能为空")};//点击确定后调用的方法
diag.show();
}
function zAlert(){
Dialog.alert("你点击了一个按钮");
}
function zConfirm(){
Dialog.confirm('警告:?',function(){Dialog.alert("");});
}
</script>
</head>
<body>
<h3 align="center"><a href="https://www.html.org.cn/"> </a></h3>
<p id="p1"></p>
<p> <input type="button" value="弹出新窗口" onclick="zOpen()" /> <input type="button" value="弹出带说明的新窗口" onclick="zOpenD()" /> <input type="button" value="弹出信息提示对话框" onclick="zAlert()" /> <input type="button" value="弹出选择对话框" onclick="zConfirm()" /> <input type="button" value="弹出内容为HTML代码" onclick="zOpenInner()" /> <input type="button" value="弹出内容为本页面内的隐藏层" onclick="zOpenEle()" /></p>
<p id="p2"></p>
<p 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></p>
<br/>
<script>sometext("p1",200);sometext("p2",200);</script>
</body>
</html>

效果图:

漂亮的jquery提示效果(仿腾讯弹出层)代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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,p,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;}
p,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 = "https://www.html.org.cn/";
diag.ShowMessageRow = true;
diag.MessageTitle = "弹出窗口示例";
diag.Message = "在这儿你可以对这个窗口的内容或功能作一些说明";
diag.OKEvent = zAlert;//点击确定后调用的方法
diag.show();
}
function zOpen(){
var diag = new Dialog("Diag2");
diag.Width = 900;
diag.Height = 400;
diag.Title = "弹出窗口示例";
diag.URL = "https://www.html.org.cn/";
diag.OKEvent = zAlert;//点击确定后调用的方法
diag.show();
}
function zOpenInner(){
var diag = new Dialog("Diag3");
diag.Width = 300;
diag.Height = 100;
diag.Title = "弹出窗口示例";
diag.innerHTML='<p style="text-align:center">直接输出html,使用dialog.<b>innerHTML</b>。</p>'
diag.OKEvent = function(){diag.close();};//点击确定后调用的方法
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("密码不能为空")};//点击确定后调用的方法
diag.show();
}
function zAlert(){
Dialog.alert("你点击了一个按钮");
}
function zConfirm(){
Dialog.confirm('警告:?',function(){Dialog.alert("");});
}
</script>
</head>
<body>
<h3 align="center"><a href="https://www.html.org.cn/"> </a></h3>
<p id="p1"></p>
<p> <input type="button" value="弹出新窗口" onclick="zOpen()" /> <input type="button" value="弹出带说明的新窗口" onclick="zOpenD()" /> <input type="button" value="弹出信息提示对话框" onclick="zAlert()" /> <input type="button" value="弹出选择对话框" onclick="zConfirm()" /> <input type="button" value="弹出内容为HTML代码" onclick="zOpenInner()" /> <input type="button" value="弹出内容为本页面内的隐藏层" onclick="zOpenEle()" /></p>
<p id="p2"></p>
<p 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></p>
<br/>
<script>sometext("p1",200);sometext("p2",200);</script>
</body>
</html>

效果图:

觉得可用,就经常来吧!Javascript技巧 脚本宝典 欢迎评论哦! js技巧,巧夺天工,精雕玉琢。小宝典献丑了!

总结

以上是脚本宝典为你收集整理的

js实例教程-漂亮的jquery提示效果(仿腾讯弹出层)

全部内容,希望文章能够帮你解决

js实例教程-漂亮的jquery提示效果(仿腾讯弹出层)

所遇到的程序开发问题,欢迎加入QQ群277859234一起讨论学习。如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典网站推荐给程序员好友。 本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。

80%的人都看过