jsp文件
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript" src="jquery-1.4.2.js"></script>
<script type="text/javascript" src="jquery-ui-1.8.9.custom.min.js"></script>
</head>
<script type="text/javascript">
$(function() {
$("#test").bind('click',function() {
$("#dialog").dialog("open");
});
$("#dialog").dialog({
bgiframe: true,
autoOpen: false,
height: 200,
width:100,
show: "blind",
modal: true,
buttons: {
'确定': function() {
$(this).dialog("关闭");
}
}
});
});
</script>
<body>
<input type="button" value="测试" id="test">
<div id="dialog" style="display:none;border-color: blue;border: 1;background-color: yellow " ></div>
</body>
</html>