Php 如何使用form post更改iframe的内容
好的,我有这个代码:Php 如何使用form post更改iframe的内容,php,html,iframe,Php,Html,Iframe,好的,我有这个代码: <body> <div id="top_bar"> <a target="content_frame" href="main/index.php"> Home | </a> <a target="content_frame" href="faq/index.html"> FAQ
<body>
<div id="top_bar">
<a target="content_frame" href="main/index.php"> Home | </a>
<a target="content_frame" href="faq/index.html"> FAQ | </a>
<a target="content_frame" href="contact/index.html"> Contact </a>
<div id="search">
<form method="POST" action="/php/search.php">
Search: <input type="text" name="search_box">
<input id="search_button" type="submit" value="Search">
<form>
</div>
</div>
<iframe name="content_frame" src="main/index.php"></iframe>
</body>
搜索:
网页看起来像这样:
当有人在“搜索”框中写入内容并按ENTER键时,我如何做到这一点?它不会改变整个页面,而是作用于iframe?设置表单的目标属性应该可以完成以下工作:)
搜索:
<form method="POST" action="/php/search.php" target="content_frame">
Search: <input type="text" name="search_box">
<input id="search_button" type="submit" value="Search">
<form>