我正在尝试将 jsp 表单放入fancybox 我的站点功能正常,所以我知道我的大多数配置都是正确的。我还对图像进行了样本测试,效果很好,但是我遇到了问题。下面是代码:
<%@ include file="/WEB-INF/jsp/include.jsp" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script>
<script type="text/javascript">
<%@ include file="../js/lightbox/jquery.fancybox.pack.js"%>
</script>
<style>
<%@ include file="../js/lightbox/jquery.fancybox.css" %>
</style>
<script type="text/javascript">
$(document).ready(function() {
$(".fancybox").fancybox();
});
</script>
<title><fmt:message key="title"/></title>
</head>
<body>
<h1><fmt:message key="heading"/></h1>
<p><fmt:message key="greeting"/></p>
<a href="<c:url value="login.htm"/>">Login</a></br>
<a href="<c:url value="officer_registration.htm"/>">Register</a></br>
<a class="fancybox" href="officer_registration.htm">Light Box Registration</a></br>
<a class="fancybox" href="http://en.gtwallpaper.com/fondecran/chiens/chiens_01.jpg" >dog</a>
</body>
</html>