>  기사  >  웹 프론트엔드  >  一个表单,如何在不打开新窗口的情况下提交_html/css_WEB-ITnose

一个表单,如何在不打开新窗口的情况下提交_html/css_WEB-ITnose

WBOY
WBOY원래의
2016-06-24 12:14:181028검색

这个表单,在页面中非得打开个新窗口才能运行,也给返回,
强制单页面,这个post却不执行了....哎
好郁闷

<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>


就是这个表单, 下面加上了 一句 
因为要在php中
if ($POST['action'] == "code") 这样使用
所以..

但问题貌似不在这里


回复讨论(解决方案)

你把

<form action="" method="POST" target="_blank">

修改为
<form action="" method="POST" target="_self">


即可,哈哈,分是我的啦

非常感谢!

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.