2012-06-27 31 views
0

我們如何在iframe容器內填充頁面的情況下返回iframe上的結果。Google in iframe

<form action="what.php" method="POST"> 
<center><input type="text" name="search"/><br/> 
<input type="submit" value="Search google" name="submit"> 
</center></form> 
<?php if (isset($_POST['submit'])) 
{ 
$a = '<iframe width="500" height="400" src="http://www.google.com/search?q='.$_POST['search'].'"></iframe>'; 
echo htmlentities($a); 
echo $a; 
} 
?> 

過載:汽車沒工作, 什麼可以得到的我現在的感覺通過我的iframe的谷歌搜索幸運的顯示結果:)原諒我的無知,如果我問一個愚蠢的問題

+0

我不明白你的問題。你想在iFrame之外顯示Google搜索結果嗎? –

+0

閱讀本 [http://stackoverflow.com/questions/8700636/how-to-show-google-com-in-an-iframe][1] [1]:HTTP:/ /stackoverflow.com/questions/8700636/how-to-show-google-com-in-an-iframe – Nuwan

+0

可能重複[如何在iframe中打開google鏈接?](http://stackoverflow.com/questions/7800370 /如何對開放的谷歌鏈接,裏面的iframe) – TJHeuvel

回答