js有alert,prompt和confirm对话框,不过不是很美体验也不是很好,用jQuery也能实现,

体验效果:http://hovertree.com/texiao/jquery/34/

代码如下:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>炫酷的jQuery对话框插件 gDialog - 何问起</title><base target="_blank" />
<link href="http://hovertree.com/texiao/jquery/34/css/normalize.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="http://hovertree.com/texiao/jquery/34/css/animate.min.css">
<link rel="stylesheet" href="http://hovertree.com/texiao/jquery/34/css/jquery.gDialog.css">
<style>
button {
border: 0;
} .container {
margin: 50px auto;
max-width: 728px;
text-align: center;
font-family: Arial;
} .btn {
background-color: #ED5565;
color: #fff;
padding: 20px;
margin: 10px 30px;
border-radius: 5px;
border-bottom: 3px solid #DA4453;
}a{color:darkslateblue;}
</style> </head> <body>
<div style="width:310px;margin:0px auto;">
<a href="http://hovertree.com/">首页</a>
<a href="http://hovertree.com/texiao/">特效</a>
<a href="http://hovertree.com/h/bjaf/4132lshc.htm">原文</a></div>
<div class="container">
<h1>jQuery gDialog Plugin Exampels</h1>
<button class="btn demo-1">Alert对话框</button>
<button class="btn demo-2">Prompt对话框</button>
<button class="btn demo-3">Prompt对话框</button>
</div>
<script src="http://hovertree.com/ziyuan/jquery/jquery-2.2.1.min.js"></script>
<script src="http://hovertree.com/texiao/jquery/34/js/jquery.gDialog.js"></script>
<script>
$('.demo-1').click(function () {
$.gDialog.alert("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse libero erat, scelerisque sit amet dolor nec, euismod feugiat massa.", {
title: "Alert对话框 by 何问起",
animateIn: "bounceIn",
animateOut: "bounceOut"
});
});
$('.demo-2').click(function () {
$.gDialog.prompt("Your website", "hovertree.com", {
title: "Prompt对话框 by 何问起",
required: true,
animateIn: "rollIn",
animateOut: "rollOut"
});
});
$('.demo-3').click(function () {
$.gDialog.confirm("Are You Sure?", {
title: "Confirm对话框 by 何问起",
animateIn: "bounceInDown",
animateOut: "bounceOutUp"
});
});
</script>
</body>
</html>

js题目:http://hovertree.com/tiku/bjaf/k44bgls5.htm

web前端汇总:http://www.cnblogs.com/jihua/p/webfront.html

最新文章

  1. iframe高度调整
  2. 一个优秀的Unity3d开发者必备的几种设计模式
  3. js Table冻结表头示例代码
  4. Android开发学习
  5. 遍历、显示ftp下的文件夹和文件信息
  6. JAVA学习第三十课(经常使用对象API)- String类:类方法练习
  7. C++的构造函数总结
  8. 消息队列RabbitMQ与Spring集成
  9. 【CentOS7】Could not retrieve mirrorlist http://mirrorlist.centos.org/?...
  10. INotifyPropertyChanged(监听数据),当数据改变时调用
  11. javascript es6 箭头函数
  12. variable_scope
  13. Python常见错误:IndexError: list index out of range
  14. bnu 10809 聚餐
  15. Android 判断SD卡是否存在及容量查询
  16. python循环结构
  17. 【bzoj5050】【bzoj九月月赛H】建造摩天楼
  18. python多线程下载文件
  19. golang (3) 编译不同的平台文件
  20. 修改mysql权限

热门文章

  1. Android6.0运行时权限管理
  2. 烂泥:wiki系统confluence5.6.6安装、中文、破解及迁移
  3. MongoDB基础
  4. CSharpGL(21)用鼠标拾取、拖拽VBO图元内的点、线或本身
  5. Go语言实战 - 网站性能优化第一弹&ldquo;七牛云存储&rdquo;
  6. 用php生成一个excel文件(原理)
  7. Android数据加密之Des加密
  8. 集成学习之Adaboost算法原理小结
  9. C#/VB.NET Excel数据分列
  10. YYModel 源码解读(二)之NSObject+YYModel.h (3)