php编程和html中的form,frame

来源:百度知道 编辑:UC知道 时间:2024/07/07 10:33:55
我的页面分了三个frame,左边一个frame,右边上下各一个,我在右上的页面中添加了form,其中action=”addtocat.php”.我想在我点击按钮后,从数据库取出的内容显示在右下的frame,但无论我怎么设置form中的target,点击都会弹出新的页面。
那位高手帮帮忙吧,我都急死了。
希望高手能给个代码。谢谢了。
用iframe也不行啊。
我没有用javascript,我是要用php来调用一个php页面,得到数据库的数据,并显示在下面的frame中。
天啊,谁了帮帮忙阿.

主页面:<html>
<head>
<title>test</title>
</head>
<frameset cols="45%,*">
<frame src="foodcat.html" name=categories scrolling=yes>
<frameset rows="50%,50%">
<frame name="righttop" src="welcom.html" target="addtocart" />
</frameset>

<frame name="addtocart" src="shoppingcart.html"/>
</frameset>
</html>
右上frame的是个php页面来调用数据库的信息,然后点击form中的按钮将信息显示在下面的frame中,就是购物车。
右上的php页面中的form的代码是:<div align="right"><form method="post" target=&quo

粘贴文件,我给你修改。

补充:
主页文件错误,有一个框没有显示出来,修改如下:

<html>
<head>
<title>test</title>
</head>
<frameset cols="45%,*">
<frame src="foodcat.html" name=categories scrolling=yes>
<frameset rows="50%,50%">
<frame name="righttop" src="welcom.html" target="addtocart" />
<frame name="addtocart" src="shoppingcart.html"/>
</frameset>
</frameset>
</html>

哈哈,这个问题是你弄错了,这个和target没有关系,你可以看看javascript中的parent,你是没有引用正确

55555

CC