⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adduser.jsp

📁 本源码主要从数据库的开发过程出发
💻 JSP
字号:
<%--     Document   : AddUser    Created on : 2008-5-9, 23:09:01    Author     : Administrator--%><%@page contentType="text/html" pageEncoding="GBK"%><%@ page import="java.sql.*" %><%@ page import="Source.userInf" %><%@ page errorPage="ErrorPage.jsp" %><jsp:useBean id="userinf" scope="session" class="Source.userInf" /><jsp:useBean id="jdbcBean" scope="session" class="Source.JDBCBean"/><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><%            int position;            String title = "";            String inf="";            if (userinf.isHasLogin()) {                position = Integer.parseInt(request.getParameter("position"));                inf=request.getParameter("inf");                switch (position) {                    case 1:                        title = "学生";                        session.setAttribute("title", "student");                        break;                    case 2:                        title = "老师";                        session.setAttribute("title", "teacher");                        break;                }            } else {                response.sendRedirect("Login.jsp");            }%><html>    <head>        <meta http-equiv="Content-Type" content="text/html; charset=GBK" />        <title>Add User</title>        <style type="text/css">            <!--            #main {                background-color: #CCCCCC;                width: 750px;                margin-right: auto;                margin-left: auto;                padding-bottom: 30px;                padding-top: 30px;            }            #main #content {                background-position: center;                background-color: #FFFFFF;                width: 600px;                margin-right: auto;                margin-left: auto;                vertical-align: text-top;                text-align: center;                padding-top: 20px;                padding-bottom: 20px;            }            .STYLE3 {                width: 600px;                background-color: #666666;                margin-right: auto;                margin-left: auto;                font-size: xx-large;                font-weight: bold;                color: #FFFFFF;            }            .STYLE4 {color: #FF0000}            -->        </style>    </head>    <body>        <div id="main">            <div class="STYLE3" id="title">Add User</div>            <div id="content">                <div align="left">添加<%=title%>  <%=inf%></div>                <form action="adduser" method="post">                    <table width="288" border="1" align="center">                        <tr>                            <th width="85" scope="row"><div align="right">Name:</div></th>                            <td width="187">                                <label>                                    <div align="left">                                        <input name="name" type="text" id="textfield" size="20">                                    </div>                                </label>                            <div align="left"><span class="STYLE4">*</span></div></td>                        </tr>                        <tr>                            <th scope="row"><div align="right">UserID:</div></th>                            <td>                                <label>                                    <div align="left">                                        <input name="userid" type="text" id="textfield2" size="20">                                    </div>                                </label>                            <div align="left"><span class="STYLE4">*</span></div></td>                        </tr>                        <tr>                            <th scope="row"><div align="right">Password:</div></th>                            <td>                                <label>                                    <div align="left">                                        <input name="password" type="text" id="textfield3" size="20">                                    </div>                                </label>                             <div align="left"><span class="STYLE4">*</span></div></td>                        </tr>                        <tr>                            <th scope="row"><div align="right">confirm:</div></th>                            <td>                                <label>                                    <div align="left">                                        <input name="confirm" type="text" id="textfield4" size="20">                                    </div>                                </label>                            <div align="left"><span class="STYLE4">*</span></div></td>                        </tr>                        <tr>                            <th scope="row"><div align="right">Email:</div></th>                            <td>                                <label>                                    <div align="left">                                        <input name="email" type="text" id="textfield5" size="20">                                    </div>                            </label>                            </td>                        </tr>                        <tr>                            <th scope="row"><div align="right">Tel:</div></th>                            <td>                                <label>                                    <div align="left">                                        <input name="tel" type="text" id="textfield6" size="20">                                    </div>                            </label>                            </td>                        </tr>                        <tr>                            <th colspan="2" scope="row">                                <label>                                    <input type="submit" id="submit" value="提交">                            </label>                            </th>                        </tr>                    </table>                </form>            </div>        </div>    </body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -