代码
提交代码
<form action="https://www.baidu.com" method="post" target="_blank">
<h2>表单提交后跳转到新窗口</h2>
<h3> 登录 </h3>
<div>
<label for="user_name">用户名</label>
<input id="user_name" name="user_name" autofocus="" required=""><!-- 用户名表单 -->
</div>
<div>
<label for="password">密码</label>
<input id="password" name="password" type="password" autocomplete="off" value="" required=""><!--密码表单-->
</div>
<div>
<button type='submit'>登录</button>
</div>
</form>
运行结果