通过response对象的sendRedirect方法重定向网页

语法格式 response.sendRedirect(String path);

 <form action="form1" method="post" action="">
    用户名:<input name="name" type="text" id="name" style="width:120px"><br>
    密    码:<input name="name" type="password" id="pwd" style="width:120px"><br>
    <br>
    <input type="submit" name="Submit" value="提交">
    </form>

```javascript
 <%
        response.sendRedirect("login.jsp");
    %>

猜你喜欢

转载自blog.csdn.net/weixin_44095453/article/details/102554578
今日推荐