这是我在 Site.master 上的代码:
<head runat="server">
<asp:ContentPlaceHolder ID="head" runat="server"></asp:ContentPlaceHolder>
</head>
在 default.aspx 页面上,我有:
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<link href="fancybox/source/jquery.fancybox.css?v=2.1.4" rel="stylesheet" type="text/css" media="screen"/>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="fancybox/source/jquery.fancybox.pack.js?v=2.1.4"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#gallery a').fancybox();
});
</script>
<div class="gallery">
<a href="images/Books/hpcos.jpeg" rel="gallery">
<img src="images/Books/hpcos.jpeg" width="70" height="70" alt = "" />
</a>
<a href="images/Books/the_hobbit.jpeg" rel="gallery">
<img src="images/Books/the_hobbit.jpeg" width="70" height="70" alt = "" />
</a>
</div>
当我单击图像时,页面仅加载图像。有人可以指出我哪里出错了。