jquery 美化弹出提示 漂亮的Dialog 对话框
2013-11-10 12:44
459 查看
三个不同的效果,分别是普通的警告,确认/取消,带一个输入框本例用了jquery.alertify.js,请到演示页面查看css文件也请到演示页面查看
演示 JavaScript Code<script type="text/javascript">
$(document).ready(function() {
$(".alert").click(function() {
var message = "<h3>Alert Dialog</h3><p>Example of an <strong>Alert Dialog</strong>. You can put any message over here.</p><br/>";
alertify.alert(message);
});
$(".confirm").click(function() {
var message = "<h3>Confirm Dialog</h3><p>Do you want to confirm this?</p><br/>";
alertify.confirm(message, function (e) {
if(e) {
alertify.success("You clicked <strong>OK</strong>");
} else {
alertify.error("You clicked <strong>Cancel</strong>");
}
});
});
$(".prompt").click(function() {
var message = "<h3>Prompt Dialog</h3><p>Please enter a value over here.</p><br/>";
alertify.prompt(message, function (e, str) {
if(e) {
alertify.success("You typed <strong>"+str+"</strong>");
} else {
alertify.error("You clicked <strong>Cancel</strong>");
}
}, "Enter a value");
});
});
</script>
XML/HTML Code<div class="container">
<ul>
<li><a href="#" class="alert">警告对话框</a></li>
<li><a href="#" class="confirm">确认/取消对话框</a></li>
<li><a href="#" class="prompt">带输入框的对话框</a></li>
</ul><br/>
</div>
原文地址:http://www.freejs.net/article_biaodan_83.html
演示 JavaScript Code<script type="text/javascript">
$(document).ready(function() {
$(".alert").click(function() {
var message = "<h3>Alert Dialog</h3><p>Example of an <strong>Alert Dialog</strong>. You can put any message over here.</p><br/>";
alertify.alert(message);
});
$(".confirm").click(function() {
var message = "<h3>Confirm Dialog</h3><p>Do you want to confirm this?</p><br/>";
alertify.confirm(message, function (e) {
if(e) {
alertify.success("You clicked <strong>OK</strong>");
} else {
alertify.error("You clicked <strong>Cancel</strong>");
}
});
});
$(".prompt").click(function() {
var message = "<h3>Prompt Dialog</h3><p>Please enter a value over here.</p><br/>";
alertify.prompt(message, function (e, str) {
if(e) {
alertify.success("You typed <strong>"+str+"</strong>");
} else {
alertify.error("You clicked <strong>Cancel</strong>");
}
}, "Enter a value");
});
});
</script>
XML/HTML Code<div class="container">
<ul>
<li><a href="#" class="alert">警告对话框</a></li>
<li><a href="#" class="confirm">确认/取消对话框</a></li>
<li><a href="#" class="prompt">带输入框的对话框</a></li>
</ul><br/>
</div>
原文地址:http://www.freejs.net/article_biaodan_83.html
相关文章推荐
- jquery 美化弹出提示 漂亮的Dialog 对话框
- 基于jQuery的弹出警告对话框美化插件(警告,确认和提示)
- jQuery弹出警告对话框美化插件(警告,确认和提示)
- jQuery弹出警告对话框美化插件(警告,确认和提示)
- 基于jQuery的弹出警告对话框美化插件(警告,确认和提示)
- jQuery UI Dialog 创建友好的弹出对话框实现代码 详细出处参考:http://www.jb51.net/article/30087.htm
- jQuery+bootstrap实现美化警告/确认/提示对话框插件
- jQuery Dialog 弹出层对话框插件--功能全面
- 教程:jQuery警告/确认/提示弹出对话框效果
- flavr—超级漂亮的jQuery扁平弹出对话框
- jQuery Dialog 弹出层对话框插件演示
- 使用dialog插件弹出提示和确定信息对话框8-8
- jQuery UI Dialog 创建友好的弹出对话框
- Dom利用javascript实现模拟弹出对话框效果的代码,类似JQuery中的dialog!
- jQuery dialog plugin jquery 弹出框 漂亮的插件
- 漂亮的jquery提示效果(仿腾讯弹出层)
- jQuery UI Dialog 创建友好的弹出对话框
- jQuery UI Dialog 创建弹出对话框的一些参数
- jQuery Dialog弹出层对话框插件演示