zoukankan      html  css  js  c++  java
  • 登录页面以及跳转页面

    登录页面

     1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
     2 <html>
     3 <head>
     4 <script type="text/javascript" src="easyui/jquery.min.js"></script>
     5 <script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
     6 <script type="text/javascript" src="easyui/locale/easyui-lang-zh_CN.js"></script>
     7 <link rel="stylesheet" href="easyui/themes/default/easyui.css">
     8 <link rel="stylesheet" href="easyui/themes/icon.css">
     9 
    10 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    11 <title>登录页面</title>
    12 <style>
    13 body {
    14     background-image: url("img/loginbackground.jpg");
    15 }
    16 
    17 #btn {
    18     margin: 30px 150px 20px 150px
    19 }
    20 
    21 
    22 .panel {
    23     margin: 350px auto
    24 }
    25 </style>
    26 
    27 <body>
    28     <div id="p" class="easyui-panel" title="登录"
    29         style=" 400px; height: 250px; padding: 10px; background-image: url('img/loginbackground.jpg');"
    30         data-options="iconCls:'icon-save',closable:true,    
    31                 collapsible:true,minimizable:true,maximizable:true">
    32         <form id="ff" method="post">
    33             <div>
    34                 <label for="name">用户名:</label> <input name="username"
    35                     class="easyui-textbox" prompt="用户名" required="true"
    36                     data-options="iconCls:'icon-man'"
    37                     style=" 300px; height: 50px">
    38             </div>
    39             </br>
    40             <div>
    41                 <label for="email">密&nbsp;&nbsp;&nbsp;码:</label> <input
    42                     name="password" class="easyui-textbox" prompt="密码" required="true"
    43                     type="password" data-options="iconCls:'icon-lock'"
    44                     style=" 300px; height: 50px">
    45             </div>
    46             <div id="btn" class="easyui-linkbutton" onclick="login()">登录</div>
    47             
    48         </form>
    49         </form>
    50     </div>
    51 </body>
    52 <script type="text/javascript">
    53     /*/ui/emplogin.do  /ui/user/add    /ui/goods/add  */
    54     $('#btn').bind('click', function() {
    55         $('#ff').form('submit', {
    56             url : "login/empLogin.do",
    57             onSubmit : function() {
    58                 // do some check    数据提交之前在此处进行表单验证 
    59                 // return false to prevent submit;    
    60             },
    61             success : function(data) {
    62                 var data = $.parseJSON(data);
    63                 if (data.code != 200) {
    64                     $.messager.show({
    65                         title : '温馨提示',
    66                         msg : data.message,
    67                         timeout : 5000,
    68                         showType : 'slide'
    69                     
    70                     });
    71                     
    72                 } else {
    73                     //跳转到主界面  BOM HTML跳转的方式   a from  js 
    74                     window.location.href = "tomain.do";
    75                 }
    76                 
    77             }
    78         });
    79     });
    80 </script>
    81 </html>

    跳转页面

     1 <!DOCTYPE html>
     2 <html>
     3 <head>
     4 <meta charset="UTF-8">
     5 <title>Insert title here</title>
     6 <script type="text/javascript" src="easyui/jquery.min.js"></script>
     7 <script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
     8 <script type="text/javascript" src="easyui/locale/easyui-lang-zh_CN.js"></script>
     9 <link rel="stylesheet" href="easyui/themes/default/easyui.css">
    10 <link rel="stylesheet" href="easyui/themes/icon.css">
    11 </head>
    12 <style>
    13 </style>
    14 <body class="easyui-layout">
    15     <div data-options="region:'north',split:true" style="height: 10%;">
    16         <h1>欢迎加入德莱联盟</h1>
    17         <h3>QQ:984025264</h3>
    18     </div>
    19     
    20     <div data-options="region:'west',split:true" style=" 250px; height: 90%">
    21         <div id="aa" class="easyui-accordion" style=" 300px; height: 200px;" fit="true"></div>
    22     </div>
    23     
    24     <div data-options="region:'center'" style="padding: 5px; background: #eee;">
    25         <div id="tt" class="easyui-tabs" style=" 100%; height: 100%;" fit="true">
    26             <div title="首页" style="padding: 20px; display: none;" >
    27                 <a href="http://www.baidu.com" target="背景图片"> 
    28                 <img src="img/1.jpg" alt="背景图片" style=" 100%; height: 100%;"  />
    29                 </a>
    30             </div>
    31         </div>
    32 
    33     </div>
    34 
    35 
    36     <script type="text/javascript">
    37         $.post("login/getPermission.do", function(data) {
    38             console.log(data);
    39             for (var i = 0; i < data.length; i++) {
    40                 var d = data[i];
    41                 $('#aa').accordion('add', {
    42                     title: d.title,
    43                     //'<ul id="tt'+d.id+'" class="easyui-tree"> </ul>'
    44                     content:'<ul id="tt'+d.id+'" class="easyui-tree"> </ul>',
    45                     selected: false
    46                 });
    47                 $('#tt'+d.id).tree({    
    48                     url:'login/getChildrenPermission.do?pid='+d.id, 
    49                     onClick: function(node){
    50                             if($('#tt').tabs('exists',node.text)){
    51                             $('#tt').tabs('select',node.text)    
    52                             }else{
    53                                 $('#tt').tabs('add',{
    54                                     title:node.text,
    55                                     content:'<iframe src="'+node.tsrc+'" style="98%;height:95%"></iframe>',
    56                                     closable:true
    57                                 })
    58                             }
    59                         }
    60                 });      
    61             }
    62         });
    63     </script>
    64 </body>
    65 
    66 
    67 
    68 
    69 </html>
  • 相关阅读:
    【转】一个lucene的官网例子
    mongodb(回滚)
    mongodb( 实现join)
    JSON.stringify && JSON.parse
    js下的面向对象
    node(规则引擎)
    objective-c(内存管理)
    STM32F0xx_USART收发配置详细过程
    STM32F0xx_GPIO配置详细过程
    STM32F0_新建软件工程详细过程
  • 原文地址:https://www.cnblogs.com/Fisherman13/p/10708824.html
Copyright © 2011-2022 走看看