<!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>
<script src="jquery-1.6.4.js" language="javascript"></script>
<script type="text/javascript" src="jquery.ui.core.js"></script>
<script type="text/javascript" src="jquery.ui.dialog.js"></script>
<script type="text/javascript" src="jquery.ui.widget.js"></script>
<script type="text/javascript" src="jquery.ui.button.js"></script>
<script type="text/javascript" src="jquery.ui.mouse.js"></script>
<script type="text/javascript" src="jquery.ui.draggable.js"></script>
<script type="text/javascript" src="jquery.ui.position.js"></script>
<script language="javascript">$(function (){
$("#bt").click(
function(){
$("#dialog-confirm").dialog("open");//这里报没有dialog这个方法,我引入了Jquery .ui.dialog.js的文件的啊
}
);
// 初始化对话框
  $("#dialog-confirm").dialog(
  {
     modal: true,             // 创建模式对话框
     autoOpen: false,
     buttons: {
         "Ok": function() {
              $(this).dialog('close');
         },
        "Cancel": function() {
            $(this).dialog('close');
        }
    }
});
});
</script>
<link type="text/css" href="jquery.ui.all.css" rel="stylesheet" />
<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>