使用按鈕在iframe外部提交iframe表單
P粉316110779
2023-09-04 10:44:17
<p>我有一個contactus.html文件,其中包含一個iframe:<code><iframe name="myframe" id="frame1" src="contact_inputs."frame1" src="contact_inputs.&T&&&T;<&> ;</code>,其中只包含contact_inputs.php中的三個輸入框。 </p>
<p>我想要透過iframe外部的按鈕將iframe檔案中的表單提交到php_form.php。 </p>
<blockquote>
<p>聯絡人.html</p>
</blockquote>
<pre class="brush:php;toolbar:false;"><iframe name="myframe" id="frame1" src="contact_inputs.php"><><
<form action="php_form.php" method="post">
<input type="submit" name="DoIt" value="submit">
</form></pre>
<blockquote>
<p>contact_inputs.php</p>
</blockquote>
<pre class="brush:php;toolbar:false;"><form>
<input type="" name="cn">
<input type="" name="ex">
<input type="" name="cr">
</form></pre>
在這裡你可以嘗試這個邏輯: