form表单提交结果显示到div、iframe、打开新窗口

1.div两个思路
一是用ajax实现;表单填写后获取数值,传给后台,后台返回数据,将数据加载给某DIV,然后让该DIV显示出来;
二是iframe提交表单,然后显示出来,在没有ajax的年代用这样的办法异步上传图片,具体的操作办法是

<div id='iframe'></div> <form target='iframe' ...>...</form>

2.   iframe

       <form class="form-horizontal" method="post" target="posthere" action="user-login" onsubmit="return checkRegForm();" >

         <iframe name="posthere" frameborder=0 width=0 height=0></iframe>

3.     <form action="URL" method="post" target="_blank">

猜你喜欢

转载自blog.csdn.net/chan_1030261721/article/details/81319381