读书人

框架有关问题

发布时间: 2012-03-19 22:03:05 作者: rapoo

框架问题!
我在做一个搜索框提交结果用百度的结果,我想用自己的域名,所以我用框架来显示百度的结果页,问题就是提交后,弹出百度的页面没有带框架,页面代码如下:

首先提交页代码:

<form action= "act.asp " method= "post " name= "form1 ">
<table> <tr> <td> <input name= "key " type= "text " /> <input type= "submit " name= "Submit " value= "提交 " /> </td> </tr> </table>

</form>

其次:act.asp框架页
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN " "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd ">
<html xmlns= "http://www.w3.org/1999/xhtml ">
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 " />
<title> 结果 </title>
</head>
<%key=Server.UrlEncode(trim(request( "key ")))%>
<frameset rows= "*,218 " frameborder= "no " border= "0 " framespacing= "0 ">
<frame src= "top.asp " name= "topFrame " scrolling= "no " noresize />
<frame src= "main.asp?key= <%=key%> " name= "mainFrame " frameborder= "yes " scrolling= "no " noresize= "noresize " />
</frameset>
<noframes> </noframes> </html>

top.asp是导航页,不发代码.

main.asp代码如下:
<% key=request( "key ")%
<iframe src= "http://www.baidu.com/s?tn=****&ct=&lm=&z=&rn=&word= <%= key %> &_si=%CB%D1%CB%F7 " width= "100% " height= "100% "> </iframe>

不知哪里出错,望大侠解决一下!

[解决办法]
baidu的页面加了代码,禁止被嵌入

读书人网 >CSS

热点推荐