Form提交表单后页面刷新不跳转的实现

1 <form action="" id="" method="post" target="nm_iframe"> 
2   <input type="text" id="input_text" name="input_text"/> 
3   <input type="submit" id="sobmit" name="submit" value="提交" /> 
4 </form> 
5 <iframe id="id_iframe" name="nm_iframe" style="display:none;"></iframe>

在form表单下添加iframe标签,设置隐藏,和name属性。

form 添加target属性,值为iframe的name。

原文地址:https://www.cnblogs.com/gxp69/p/7081859.html