jsp網(wǎng)頁(yè)怎么運(yùn)行 如何實(shí)現(xiàn)jsp本頁(yè)面跳轉(zhuǎn)?
如何實(shí)現(xiàn)jsp本頁(yè)面跳轉(zhuǎn)?1.Jsp頁(yè)面跳轉(zhuǎn)的第一種方式:提交表單代碼如下: <!--第一種跳轉(zhuǎn)方式:提交表單--> <form name="form" met
如何實(shí)現(xiàn)jsp本頁(yè)面跳轉(zhuǎn)?
1.Jsp頁(yè)面跳轉(zhuǎn)的第一種方式:提交表單
代碼如下:
<!--第一種跳轉(zhuǎn)方式:提交表單-->
<form name="form" method="post" action="page2.jsp">
<input type="submit" value="跳轉(zhuǎn)1">
</form>
2.Jsp頁(yè)面跳轉(zhuǎn)的第二種方式:Javascript實(shí)現(xiàn)
代碼如下:
<script type="text/javascript">
function next(){
window.location = "page2.jsp" }
</script>
3.Jsp頁(yè)面跳轉(zhuǎn)的第三種方式:重定向分
代碼如下:
<!--重定向-->
<% //1.
response.sendRedirect("page2.jsp")
%>