jQuery--对话框插件--dialog
来源:互联网 发布:JS submit 重复提交 编辑:程序博客网 时间:2024/05/27 00:34
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>对话框插件</title>
<link href="http://www.imooc.com/data/jquery-ui.css" rel="stylesheet" type="text/css" />
<link href="style.css" rel="stylesheet" type="text/css" />
<script src="http://www.imooc.com/data/jquery-1.8.2.min.js" type="text/javascript"></script>
<script src="http://www.imooc.com/data/jquery-ui-1.9.2.min.js" type="text/javascript"></script>
</head>
<body>
<div id="divtest">
<div class="content">
<span id="spnName" class="fl">张三</span>
<input id="btnDelete" type="button" value="删除" class="fr"/>
</div>
<div id='dialog-modal'></div>
</div>
<script type="text/javascript">
$(function () {
$("#btnDelete").bind("click", function () { //询问按钮事件
if ($("#spnName").html() != null) { //如果对象不为空
sys_Confirm("您真的要删除该条记录吗?");
return false;
}
});
});
function sys_Confirm(content) { //弹出询问信息窗口
$("#dialog-modal").dialog({
height: 140,
modal: true,
title: '系统提示',
hide: 'slide',
buttons: {
'确定': function () {
$("#spnName").remove();
$(this).dialog("close");
},
'取消': function () {
$(this).dialog("close");
}
},
open: function (event, ui) {
$(this).html("");
$(this).append("<p>" + content + "</p>");
}
});
}
</script>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>对话框插件</title>
<link href="http://www.imooc.com/data/jquery-ui.css" rel="stylesheet" type="text/css" />
<link href="style.css" rel="stylesheet" type="text/css" />
<script src="http://www.imooc.com/data/jquery-1.8.2.min.js" type="text/javascript"></script>
<script src="http://www.imooc.com/data/jquery-ui-1.9.2.min.js" type="text/javascript"></script>
</head>
<body>
<div id="divtest">
<div class="content">
<span id="spnName" class="fl">张三</span>
<input id="btnDelete" type="button" value="删除" class="fr"/>
</div>
<div id='dialog-modal'></div>
</div>
<script type="text/javascript">
$(function () {
$("#btnDelete").bind("click", function () { //询问按钮事件
if ($("#spnName").html() != null) { //如果对象不为空
sys_Confirm("您真的要删除该条记录吗?");
return false;
}
});
});
function sys_Confirm(content) { //弹出询问信息窗口
$("#dialog-modal").dialog({
height: 140,
modal: true,
title: '系统提示',
hide: 'slide',
buttons: {
'确定': function () {
$("#spnName").remove();
$(this).dialog("close");
},
'取消': function () {
$(this).dialog("close");
}
},
open: function (event, ui) {
$(this).html("");
$(this).append("<p>" + content + "</p>");
}
});
}
</script>
</body>
</html>
0 0
- jQuery--对话框插件--dialog
- jquery 对话框(Dialog)插件
- jQuery Dialog弹出层对话框插件演示
- jQuery Dialog 弹出层对话框插件
- jQuery Dialog 弹出层对话框插件
- jQuery Dialog 弹出层对话框插件演示
- jQuery Dialog弹出层对话框插件演示
- 【jQuery】对话框插件——dialog
- 【JQuery UI】对话框插件——dialog
- jQuery Dialog 弹出层对话框插件--功能全面
- jQuery Dialog 弹出层对话框插件--功能全面
- jQuery Dialog对话框事件
- jquery Dialog 对话框
- jQuery dialog对话框
- jquery 经典dialog插件
- jQuery插件--dialog效果
- jquery-dialog对话框的实现
- jQuery UI弹出Dialog对话框
- PL/SQL自定义类型与包的封装
- web漏洞详解及修复建议
- protobuf博客截取
- 如何给苹果提交Bug或功能需求?
- Oracle 忘记用户名和密码的解决办法
- jQuery--对话框插件--dialog
- Python学习之路8——Python对象2
- HDU 4276 The Ghost Blows Light(树型DP)
- Memcache配置
- SQL Server 版本号汇总
- web.xml中url-pattern /和/*之间的区别
- 如何利用多级抽象思维来设计库?
- 解决 repo init时, “gpg: 无法检查签名:找不到公钥”
- visual studio 2013数据源类型列表中没有SQLite的解决方法