JSP的一个后台页面

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>admin</title>
</head>
<style type="text/css">
    *{
        margin: 0;
        padding: 0;
    }
    body{
        width: 100%;

    }
    a{
     text-decoration: none;
      color: #f5fff5;
    }
    .contain{
        margin-left: 1%;
        width: 98%;
        border-left-width: 5px;
        border-right-width: 5px;
        border-top-width: 0px;
        height: 830px;
    }
    /*顶部*/
    .top{
        padding-top: 10px;
        width: 100%;
        height: 40px;
    }
    .system{
        font-size: 30px;
        font-family: 华文新魏;
        float: left;
        color: #0ca0ff;
    }
    .admin{
        float: right;
        margin-right: 2%;
        color: #37080a;
    }

    /*中间内容区*/
    .content{
        height: 820px;
        background-color: #daffea;
        width: 100%;
    }
    .menu{
        width: 12%;
        float: left;
        height: 800px;
        background-color: #31372d;
    }
    .headimg_name{
        margin-top: 10px;
        text-align: center;
        font-size: 20px;
        color: #f5fff5;
    }
    .headimg{
        margin-top: 100px;
        margin-left: 25%;
        border-radius: 50px;
    }
    .address{
        margin-top: 5px;
        text-align: center;
        font-size: 10px;
        color: rgba(255, 252, 229, 0.67);
    }
    .exit{
        padding-top: 2px;
        margin-top: 10px;
        display: block;
        height: 25px;
        width: 40%;
        margin-left: 30%;
        margin-right: 30%;
        text-align: center;
        font-size: 15px;
        border-radius: 15px;
        color: #f5fff5;
        border-style: solid;
        border-width: 1px;
        border-color: #75ffdf;
    }
    .exit:hover{
        color: #75ffdf;
    }
    .menu_ul{
        margin-top: 50px;
        color: #f5fff5;
    }
    img{
        border-radius: 50px;
    }
    li{
        display: block;
        list-style: none;
        height: 40px;
        border-top-width: 1px;
        border-bottom-width: 0px;
        border-left-width: 0px;
        border-right-width: 0px;
        border-style: solid;
        padding-top: 15px;
    }
    .lastli{
        border-bottom-width: 1px;
    }
    li:hover{
        color: #75ffdf;
        border-left-width: 1px;
    }
    
    
    /*右侧内容部分*/
    #right_content{
        width: 88%;
        float: left;
        height: 840px;
    }
    </style>
<body>
  <div class="contain">
      <div class="top"><div class="system">农村特色产品销售系统</div><div class="admin"><strong>欢迎您!超级管理员</strong></div></div>
      <div class="content">
          <div class="menu">
              <div class="headimg"><img width="100px" height="100px" src="img/admin.jpg"></div>
              <div class="headimg_name">超级管理员</div>
              <div class="address">西安邮电大学</div>
              <div class="exit"><a href="/RuralSales/adminexit">退出登录</a></div>
              <div class="menu_ul">
                  <ul>
                      <li onclick="goodstype()">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商品类型管理</li>
                      <li onclick="shop()">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商户管理</li>
                      <li onclick="user()" class="lastli">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;消费者管理</li>
                      <li onclick="user()" class="lastli">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;购物车管理</li>
                      <li onclick="user()" class="lastli">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;订单管理</li>
                  </ul>
              </div>
          </div>
          <div id="right_content">

          </div>
      </div>
  </div>
  <script type="text/javascript">
//创建访问对象
  function createXMLHTTPObject(){
      var XMLHttpFactories=[
       function () {
           return new XMLHttpRequest();
       },
       function () {
           return new ActiveXObject("Msxml2.XMLHTTP");
       },
       function(){
          return new ActiveXObject("Msxml3.XMLHTTP");
       },
       function () {
           return new ActiveXObject("Microsoft.XMLHTTP");
       }
      ];
      var xmlhttp=false;
      for(var i=0;i<XMLHttpFactories.length;i++) {
      	try{
      		xmlhttp=XMLHttpFactories[i]();
      	}catch (e) {
				continue;
			}
      	break;
      }
      return xmlhttp;       //返回是对象实例
  }
  function goodstype() {
      var x=createXMLHTTPObject();
      var url="/RuralSales/querytype";
      x.open("GET",url,true);
      x.onreadystatechange=function () {
          if(x.readyState==4&&x.status==200){
              var o=document.getElementById("right_content");
           
              o.innerHTML=x.responseText;
          }
      }
      x.send(null);
  }
  function shop() {
	  var x=createXMLHTTPObject();
      var url="/RuralSales/queryshop";
      x.open("GET",url,true);
      x.onreadystatechange=function () {
          if(x.readyState==4&&x.status==200){
              var o=document.getElementById("right_content");
              o.innerHTML=x.responseText;
          }
      }
      x.send(null);
  }
  function user() {
	  var x=createXMLHTTPObject();
      var url="/RuralSales/queryuser";
      x.open("GET",url,true);
      x.onreadystatechange=function () {
          if(x.readyState==4&&x.status==200){
              var o=document.getElementById("right_content");
              o.innerHTML=x.responseText;
          }
      }
      x.send(null);
}
  </script>
</body>
</html>

 

  • 2
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
作为AI语言模型,我可以给出一些思路和建议,但是我并不具备实际编写代码的能力。 1. 设计数据库结构 后台管理系统通常需要存储大量数据,因此首先需要设计数据库结构。可以使用关系型数据库如MySQL或非关系型数据库如MongoDB。 2. 构建前端页面 后台管理系统需要有一个友好的前端页面,可以使用HTML、CSS、JavaScript等技术进行构建。可以参考现有的后台管理系统的设计风格,或者自己创新设计。 3. 编写后端接口 后台管理系统需要与数据库进行交互,因此需要编写后端接口。可以使用Java语言和JSP技术进行编写。可以使用开源框架如Spring、Hibernate等简化开发。 4. 实现用户登录和权限管理 后台管理系统需要实现用户登录和权限管理。可以在数据库中保存用户信息和权限信息,使用Session和Cookie实现用户登录和验证,使用拦截器实现权限管理。 5. 实现数据的增删改查 后台管理系统需要实现对数据的增删改查功能。可以编写相应的后端接口,使用AJAX技术实现前后端数据的交互。 6. 部署和测试 完成以上步骤后,需要将后台管理系统部署到服务器上,并进行测试。可以使用Tomcat等Java Web容器进行部署。测试时需要测试各种功能和异常情况,确保系统的稳定性和安全性。 总之,编写一个后台管理系统需要综合考虑数据库、前端、后端、安全等方面的知识和技能,需要一定的编程经验和技术储备。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值