我正在尝试将 Fancybox 添加到我的 ASP.NET MVC 应用程序中,但遇到了一些麻烦。
如您所见,我添加了对 jQuery 和 Fancybox 的引用。css 封装在我的 style.css 中。所有的图片都在正确的位置。
<link rel="stylesheet" href="/Content/style.css" type="text/css" media="screen" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="/Scripts/jquery.fancybox-1.2.6.pack.js"></script>
好吧,我添加了这行来启动 Fancybox 插件:
<script type="text/javascript">
$(document).ready(function() {
$("a.zoom").fancybox(); // The a with zoom class
});
</script>
然后我有链接:
<a class="zoom" href="http://www.nytimes.com">This goes to iframe</a>
但是当我点击链接时,我得到一个:Microsoft JScript 运行时错误:Permission denied alt text http://img265.imageshack.us/img265/7738/screenshot20091123at352.png
之后这是我的屏幕: alt text http://img14.imageshack.us/img14/7738/screenshot20091123at352.png
我不知道该怎么办。我很绝望,因为我整天都在试图弄清楚发生了什么。请帮忙!:)