你在1.php的link 里的代码 <a href="http://www.sina.com.cn" target="你frame的name">新浪首页</a>就可以了~~你点这个link就只会在你1.php的frame里显示了~~~
解决方案 »
- window.open()打开新窗口的焦点问题
- 一个难问题,在线等关于JavaScript正则得!
- 请教大家一个关于innerHTML的问题
- JS如何取得窗口高度
- javascript到底全局变量作用域是什么,为什么在函数中改变了无效??在线等!~急,请知道的人进来回答下好吗?
- 急textarea的字符插入问题
- 一个逻辑计算题
- 高手请进:由于设计的需要,请问各位如本论坛的左侧实时树形导航条是如何实现的???急,急!!
- 如何利用程序激发一个onclick事件?
- Google Map API 函数回调问题
- 陶宝的注册页中,校验码难道放在cookie中了吗?为什么断网后也可以判断输入是否正确?
- 关于eval的问题
<a href="">
<form action="">这个都能在框架里跳转,但 header(location)不行呀
http://community.csdn.net/Expert/TopicView3.asp?id=5014385
另附:我本地测试是可以的,楼主可以按下面方试试:
/*************8随便取下名,test.php***************/<?php
function welcom_to_php()
{
echo "Hello World!";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<meta http-equiv="content-type" content="text/html" charset="GB2312">
<link rel="stylesheet" type="text/css" href="">
<script type="text/javascript" src=""></script>
<script language="javascript" type="text/javascript"></script>
</HEAD><BODY>
<body>a
<iframe name="frame1" src="p1.php" border="1" bordercolor="#3399FF">
</BODY>
</HTML>/**********下面取名为p1.php**************8/<?php
header("Location:http://www.163.com");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<meta http-equiv="content-type" content="text/html" charset="GB2312">
</HEAD><BODY></BODY>
</HTML>
里面的跳转这样写
<?
echo "<script>location='http://www.sina.com.cn;</script>";
?>