日期:2014-05-20  浏览次数:20691 次

初学: 一个关于页面重导的问题
<%@page     contentType= "text/html "%>    
<%@page     pageEncoding= "gb2312 "%>    
<%    
String     Name=request.getParameter( "txtname ");    
String     Pass=request.getParameter( "txtpassword ");    
if((Name.equals( " ")     &brvbar;     &brvbar;(Pass.equals( " "))     {    
              response.sendRedirect( "sendredirect.html ");    
}    
%>    
 
<html>    
              <head>    
                              <meta     http-equiv= "Content-Type "     content= "text/html;     charset=gb2312 ">    
                              <title> 网页重导 </title>    
              </head>    
              <body>    
                      提交名字     <%=Name%> <br>    
                      提交密码     <%=Pass%> <br>    
              </body>    
</html>    
==================================================================    
<!DOCTYPE     HTML     PUBLIC     "-//W3C//DTD     HTML     4.01     Transitional//EN ">    
 
<html     lang= 'zh '>    
      <head>    
      <meta     http-equiv= "Content-Type "     content= "text/html;     charset=GB2312 ">    
              <title> 重导页面 </title>    
      </head>    
      <body>    
                      <h1> 测试重导.. </h1>    
                      <hr>    
                      <form     action= "sendredirect.jsp "     method= "post "     name= "form1 ">    
                                      输入姓名 <input     type= "text "     name= "txtname "> <br>    
                                      输入密码 <input     type= "password "     name= "txtpassword "> <br>    
                                      <button     name= "submitButton "     type= "submit "> 提交 </button>