form表单target实现当前页表单提交而不进行跳转刷新

在form标签中的格式

<form action="xxxx.asp" method="post" name="form1" id="form1"  target="iframe_operate"  onSubmit="return check_form(form1)">
</form>

现在需要一个ifarme标签。放到form标签的结尾处

  <iframe width="0" height="0" src="" name="iframe_operate" id="iframe_operate"></iframe>

提交到action后,action返回一串javascript语句

<script language="JavaScript">
alert("NB的不刷新!");
window.location.replace("about:blank");
</script>
原文地址:https://www.cnblogs.com/acoll/p/2838419.html