标题:在jsp中遇到一点问题String literal is not properly closed by a double-q ...
只看楼主
小阿芳
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2012-3-30
 问题点数:0 回复次数:2 
在jsp中遇到一点问题String literal is not properly closed by a double-quote是什么问题呀,我写的程序一直
<%@page contentType="text/html;charset=gb2312"%>

<%
String username=request.getParameter("username");

String password=request.getParameter("password");

String type=request.getParameter("type");

if(username.equals("admin")&&password.equals("admin"))
     {  
        
         session.setAttribute("username",username);
         session.setAttribute("password",password);
         session.setAttribute("type",type);
          if(type.equals("manager "))
               response.sendRedirect("manager.jsp");
             else if(type.equals("user"))

              response.sendRedirect("user.jsp");
            else{
               out.print("<script language='JavaScript' type='text/JavaScript'>
               alter("请正确填写信息!");</script> ");
            
     response.sendRedirect("admin.jsp");
           


    }   
  
 }
     
else{

     out.print("<script>alert('请正确填写信息!');window.location.href='admin.jsp'</script>");
  

  }

   
%>
  



搜索更多相关主题的帖子: html jsp properly password manager 
2012-04-02 14:39
dengjinbao
Rank: 3Rank: 3
等 级:论坛游侠
帖 子:64
专家分:119
注 册:2011-3-22
得分:0 
out.print("<script language='JavaScript' type='text/JavaScript'>
               alter("请正确填写信息!");</script> ");
错误,alert方法都写错啦
out.print("<script  type='text/JavaScript'>");
    out.print("alert('请正确填写信息!');");
   out.print("</script> ");
2012-04-27 19:50



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-365046-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.374379 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved