Jquery dialog

来源:互联网 发布:淘宝匿名买家提取器 编辑:程序博客网 时间:2024/05/16 11:30
 

<!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>
<link type="text/css" href="jquery.ui.all.css" rel="stylesheet" />
<link type="text/css" href="jquery-ui-1.8.18.custom.css" rel="stylesheet" />
<script src="jquery-1.6.4.js" language="javascript"></script>

<script type="text/javascript" src="jquery-ui-1.8.18.custom.min.js"></script>

<script language="javascript">
  

$(function (){
$("#bt").click(
function(){
$("#dialog-confirm").dialog("open");
}
);
// 初始化对话框
  $("#dialog-confirm").dialog(
  {
     modal: true,             // 创建模式对话框
     autoOpen: false,
   buttons: {
          "Ok": function() {
               $(this).dialog('close');
          },
         "Cancel": function() {
             $(this).dialog('close');
         }
     }

   
});


});
</script>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<input type="button" value="删除" id="bt" />
<div id="dialog-confirm" title="Empty the recycle bin?" style="display:none">
<p>
<span class="ui-icon ui-icon-alert" style="float:left;margin:0 7px 20px 0;"></span>
 These items will be permanently deleted and cannot be recovered. Are you sure?</p>
</div>
</body>
</html>

原创粉丝点击