如何解决在Iframe之外的相同窗口php文件中打开
|| 我有这个php文件,它来自我的日期数据库<?php
$cdb = new PDO(\'mysql:dbname=xxx;host=localhost\',\'xxx\',\'xxx\');
foreach ($cdb->query(\"SELECT * FROM images ORDER BY posted DESC LIMIT 3\") AS $img)
{
$twofirst = substr($img[\'hash\'],2);
echo \'
<a style=\"position: relative; display: block; height: 140px;\" href=\"/booru/post/view/\' . $img[\'id\'] . \'\" target=\"_blank\">
<img src=\"booru/timthumb.php?src=images/\' . $twofirst . \'/\' . $img[\'hash\'] . \'&h=125&w=125&q=100\" width=\"125px\" style=\"border-style: none\"/>
</a>
\';
}
模板
<div class=\"section\">
<div class=\"secondaryContent\">
<h3>New Cosplays</h3>
<iframe marginwidth=\"0\" marginheight=\"0\" width=\"125px\" height=\"400px\" scrolling=\"no\" frameborder=0 src=\"image.php\">
</iframe>
</div>
</div>
有没有更好的方法可以使它正常工作?
如果我不添加ѭ2,它只是在iframe中打开页面,这不是我想要的
有人说要使用AJAX,但如果有人可以向我展示一个很好的例子,我什至不知道如何开始。
谢谢你的时间。
解决方法
使用target = \“ _ top \”代替\“ _ blank \”。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。