2011-09-12 29 views
-2

我想要一个搜索框,其中一个人输入一个数字,然后该表单打开一个新页面,其中有一个iframe,iframe的url为http://othersite.com/results.php?id=numbersinputfromsearchbox搜索框将输入发送到新页面上的iframe url

这可能吗?我使用WordPress的PHP/MySQL/Apache/Linux的,如果这可以帮助你回答我。谢谢!!

+0

是这样的? http://stackoverflow.com/questions/3141189/insert-php-variable-at-the-end-of-url-string-with-an-iframe 对不起,我很新的编程。 – Tim

回答

0
<form action="http://othersite.com/results.php?id=numbersblahblah" method="post" target="_blank"> 
    <!-- form fields here --> 
    <input type="submit" value="Search" /> 
</form> 
+0

iframe将位于我自己网站的不同页面上。 – Tim

+0

据我所知,您可以发布到同一页面上的iframe,但不会在其他页面上发布。为了解决这个问题,你可以使用'$(this).serialize();“在后期序列化表单,将其附加到表单的'action',然后在另一端反序列化并创建一个iframe元素,然后将它附加到身体上......但它确实非常非常混乱,你确定没有其他更清洁的解决方案吗?:) – Joe

相关问题