iframe的框架内链接指向本页无响应

WBOY
Release: 2016-06-23 13:57:03
Original
1037 people have browsed it

在iframe的框架内,如果框架内当前页为news.php,里面有个链接指向news.php?id=1,点完后,框架全部空白,也没有加载页面.
就是指向本页链接带参数的无响应


回复讨论(解决方案)

显示内容的位置 定义了没

链接有加target="framename"吗?

链接有加target="framename"吗?


不行啊,加上这个成另一页打开了啊!

显示内容的位置 定义了没


定义啥????????

main.php iframe news.php
news.php 里面有连接,连去news.php?id=1
点击后可以在iframe内跳转。
main.php

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title> main </title> </head> <body>  <iframe src="news.php"></iframe> </body></html>
Copy after login
Copy after login

news.php
<?php$id = isset($_GET['id'])? $_GET['id'] : '';echo 'news'.$id.'<br>';echo '<a href="news.php?id=1">news1</a>';?>
Copy after login
Copy after login

main.php iframe news.php
news.php 里面有连接,连去news.php?id=1
点击后可以在iframe内跳转。
main.php

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title> main </title> </head> <body>  <iframe src="news.php"></iframe> </body></html>
Copy after login
Copy after login

news.php
<?php$id = isset($_GET['id'])? $_GET['id'] : '';echo 'news'.$id.'<br>';echo '<a href="news.php?id=1">news1</a>';?>
Copy after login
Copy after login


是这种情况,但链接news.php?id=1点不开
如果换成list.php?id=1点得开

list.php?id=1 点得开
news.php?id=1 点不开
显然是 news.php 有问题!

问题没有找到,换文件名就可以了

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template