form表单提交(非ajax模拟),默认会在本窗口打开
可以使用taget属性,设置在新窗口中打开,如:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <body> <a href='#' οnclick='doLogin()'>问题跟踪系统</> <form name="loginform" action='http://10.5.19.241:8980/s.html' method="post" target="_blank" > <input type="hidden" name="os_username"size="25" value="admin"> </form> </body> </html> <script> function doLogin(){ document.loginform.submit(); } </script>