4月22日 RIA 周日

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">

    <title>My JSP 'login.jsp' starting page</title>

    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->

  <script type="text/javascript" src="js/jquery-1.8.2.js"></script>
    <script>
        $(function (){
            $("[id='登录']").click(function(){
                var zh = $("#zh").val();
                var mm = $("#mm").val();

                $.ajax({
                    url:"login",
                    type:"post",
                    data:{zhs:zh,mms:mm},
                    dataType:"text",
                    success:function(msg){
                        if(msg==1){
                            alert("登录成功");
                            location="list?m=list";
                        }else{
                            alert("登录失败");
                            location.reload();
                        }
                    }
                });
            });
        });

    </script>
  </head>

  <body>
    账号:<input type="text" id="zh"><br>
    密码:<input type="text" id="mm"><br>
    <input type="button" id="登录" value="登录">
  </body>
</html>

在问题出现的那一瞬间,一定要控制好自己的情绪,不要发货,不要偏激,不要说出什么国际的话,要懂得忍耐。忍耐不是为了让你不去处理这件事情,而是为了避免在情绪失控的情况下,干出什么让自己丢脸的事情。以后你就会知道,生活中真的没有几件事情值得我们搭上礼貌,教养,人品和格局的。——扶南

猜你喜欢

转载自blog.csdn.net/helloworld_1996/article/details/80043585