<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>测试</title>
<link rel="stylesheet" href="js/dialog/themes/base/jquery.ui.all.css">
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="js/dialog/jquery.ui.core.js"></script>
<script type="text/javascript" src="js/dialog/jquery.ui.widget.js"></script>
<script type="text/javascript" src="js/dialog/jquery.ui.mouse.js"></script>
<script type="text/javascript" src="js/dialog/jquery.ui.button.js"></script>
<script type="text/javascript" src="js/dialog/jquery.ui.draggable.js"></script>
<script type="text/javascript" src="js/dialog/jquery.ui.position.js"></script>
<script type="text/javascript" src="js/dialog/jquery.ui.resizable.js"></script>
<script type="text/javascript" src="js/dialog/jquery.ui.dialog.js"></script>
<script>
$(function() {
$( "#dialog" ).dialog({
width:400,
height:300
});
});
</script>
</head>
<body><div id="dialog" title="Basic dialog">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div><div class="demo-description">
<p>The basic dialog window is an overlay positioned within the viewport and is protected from page content (like select elements) shining through with an iframe. It has a title bar and a content area, and can be moved, resized and closed with the 'x' icon by default.</p>
</div>
</body>
</html>jqueryjQuery UIJavaHTMLJSP
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>测试</title>
<link rel="stylesheet" href="js/dialog/themes/base/jquery.ui.all.css">
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="js/dialog/jquery.ui.core.js"></script>
<script type="text/javascript" src="js/dialog/jquery.ui.widget.js"></script>
<script type="text/javascript" src="js/dialog/jquery.ui.mouse.js"></script>
<script type="text/javascript" src="js/dialog/jquery.ui.button.js"></script>
<script type="text/javascript" src="js/dialog/jquery.ui.draggable.js"></script>
<script type="text/javascript" src="js/dialog/jquery.ui.position.js"></script>
<script type="text/javascript" src="js/dialog/jquery.ui.resizable.js"></script>
<script type="text/javascript" src="js/dialog/jquery.ui.dialog.js"></script>
<script>
$(function() {
$( "#dialog" ).dialog({
width:400,
height:300
});
});
</script>
</head>
<body><div id="dialog" title="Basic dialog">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div><div class="demo-description">
<p>The basic dialog window is an overlay positioned within the viewport and is protected from page content (like select elements) shining through with an iframe. It has a title bar and a content area, and can be moved, resized and closed with the 'x' icon by default.</p>
</div>
</body>
</html>jqueryjQuery UIJavaHTMLJSP
这个头有问题 你把头改成<!DOCTYPE html>试试