管理登录页面

<!DOCTYPE html>

<html lang="zh-CN">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>企业管理系统</title>

    <style>

        /* 全局样式 */

        body {

            font-family: Arial, sans-serif;

            margin: 0;

            padding: 0;

        }

        /* 登录页样式 */

        .login-container {

            width: 300px;

            margin: 100px auto;

            padding: 20px;

            border: 1px solid #ccc;

            border-radius: 5px;

            text-align: center;

        }

        .login-container input {

            width: 100%;

            margin-bottom: 10px;

            padding: 8px;

            box-sizing: border-box;

        }

        .login-container button {

            width: 100%;

            padding: 10px;

            background-color: #007BFF;

            color: white;

            border: none;

            border-radius: 5px;

            cursor: pointer;

        }

        .login-container button:hover {

            background-color: #0056b3;

        }

        /* 管理页面样式 */

        .admin-container {

            display: none;

            padding: 20px;

        }

    </style>

</head>

<body>

    <!-- 登录页 -->

    <div class="login-container">

        <h2>企业管理系统登录</h2>

        <input type="text" id="username" placeholder="用户名">

        <input type="password" id="password" placeholder="密码">

        <button onclick="login()">登录</button>

    </div>

    <!-- 管理页面 -->

    <div class="admin-container" id="adminPage">

        <h2>企业管理页面</h2>

        <p>这里是企业管理的主内容区域。</p>

    </div>

    <script>

        function login() {

            const username = document.getElementById('username').value;

            const password = document.getElementById('password').value;

            // 简单的验证,实际应用中应与后端交互

            if (username === 'admin' && password === 'admin123') {

                document.querySelector('.login-container').style.display = 'none';

                document.getElementById('adminPage').style.display = 'block';

            } else {

                alert('用户名或密码错误,请重试。');

            }

        }

    </script>

</body>

</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值