Home > Web Front-end > HTML Tutorial > How to submit a form without opening a new window_html/css_WEB-ITnose

How to submit a form without opening a new window_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:14:18
Original
1067 people have browsed it

This form has to open a new window in the page to run, and it returns.
Forced single page, but this post is not executed... ugh
So depressing

<form action="" method="POST" target="_blank">  <tr class="firstalt">	<td align="center"><b>xxxxx系统</b></td>  </tr>  <tr class="secondalt">		<td align="left"  ><br><ul><li>您的ip是:127.0.0.1 请注意您的行为,因此带来的风险将由您承担!</li></ul></td>  </tr>  <tr class="firstalt">	<td align="center" height=40  >验证号: <input name="code" value="" type="text"  class="input" size="100" ><input name="" value="提交" type="submit"  class="input" size="30" ><input name=action type=hidden value=code></td>  </tr></table>	</td></tr></form>
Copy after login


This is the form, with the sentence added below
Because it needs to be in php
if ($POST['action' ] == "code") Use
like this, so...

But the problem doesn’t seem to be here


Reply to the discussion ( Solution)

You change

<form action="" method="POST" target="_blank">
Copy after login

to
<form action="" method="POST" target="_self">
Copy after login


That’s it, haha, the points are mine

Thank you very much!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template