我正在使用jquery prettyphoto 2.5.3,我想知道如何在选择iframe中的图像链接时,我想知道如何在iframe的父窗口中显示?
这是我的代码:
iframe 中的页面:
<html>
<head>
<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen"/>
<script src="js/jquery.prettyPhoto.js" type="text/javascript"></script>
</head>
<body>
<a href="animage.jpg" rel="prettyPhoto">
<img src="animage.jpg" height="200" width="200"/>
</a>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto();
});
</script>
</body>
当我自己加载此页面时,灯箱工作正常。
框架代码:
<html>
<head>
</head>
<body>
<iframe src="inner.html"/>
</body>
</html>
但是,当我使用 iframe 加载页面并单击 iframe 中页面中的图像链接时,我希望灯箱显示在父窗口中而不是 iframe 中。