<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>对话框效果</title>
<!--引入jquery类库文件-->
<script language="javascript" type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script language="javascript" type="text/javascript" src="../js/jquery-ui-1.8.18.custom.min.js"></script>
<!--引入css样式类库文件-->
<link rel="stylesheet" href="../css/ui-lightness/jquery-ui-1.8.18.custom.css">
<script type="text/javascript">
$(function(){
$("#dialog").dialog({
//设置对话框打开方式,不自动打开
autoOpen:false,
//打开时的动画效果
show:"blind",
//关闭时的动画效果
hide:"explode",
//遮罩效果
modal:true,
//添加对话框标题
title:"我是对话框"
})
$("#dialog_link").click(function(){
$("#dialog").dialog("open");
});
});
</script>
</head>
<body>
<h1>模拟一个dialog效果</h1>
<a href="#" id="dialog_link"><span>open_dialog</span></a>
<div id="dialog">
hello
</div>
</body>
</html>