2020/12/08

选课的一些jsp层

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>
    .a{
        margin-top: 20px;
    }
    .b{
        font-size: 20px;
        width: 160px;
        color: white;
        background-color: greenyellow;
    }
</style>
</head>
<body>
<center>
<h2 style="color: red;">管理员登录界面</h2>
<div>
<a href="tadd.jsp">1.教师信息录入</a>
</div>
<div>
<div>
</div>
<a href="sadd.jsp">2.学生信息录入界面</a>
</div>
</center>
     
</body>

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>
    .a{
        margin-top: 20px;
    }
    .b{
        font-size: 20px;
        width: 160px;
        color: white;
        background-color: greenyellow;
    }
</style>
</head>
<body>
<center>
<h2 style="color: red;">登记</h2>
<div>
<a href="tdenglu.jsp">1.老师登录界面</a>
</div>
<div>
<div>
</div>
<a href="student.jsp">2.学生登录界面</a>
</div>
<div>
</div>
<div>
<a href="boss.jsp">3.管理员登录界面</a>
</div>
    </center>
</body>

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
       <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>
    .a{
        margin-top: 20px;
    }
    .b{
        font-size: 20px;
        width: 160px;
        color: white;
        background-color: greenyellow;
    }
</style>
</head>
<body>
    <%
         Object message = request.getAttribute("message");
         if(message!=null && !"".equals(message)){
       
    %>
         <script type="text/javascript">
              alert("<%=request.getAttribute("message")%>");
         </script>
    <%} %>
     
    <%
    String tname=(String) session.getAttribute("tname");
    %>
 
    <div align="center">
        <h1 style="color: red;">课程信息登记</h1>
         <form action="Servlet?method=classadd" method="post" >
      
            <div class="a">
                课程编号:<input type="text" id="kid" name="kid" />
            </div>
            <div class="a">
               课程名称:<input type="text" id="kname" name="kname" />
                 </div>
                  
            <div class="a">
               选课人数:<input type="text" id="knumber" name="knumber" />
                 </div>    
                  
          <div class="a">
               任课教师:<input type="text" id="kteacher" name="kteacher" value=<%=tname %>>(修改无效)
                 </div>  
         
                      
            <div class="a">
                <button type="submit" class="b">提  交<tton>
            </div>
             
        </form>
    </div>
</body>
 
     
    

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>
    .a{
        margin-top: 20px;
    }
    .b{
        font-size: 20px;
        width: 160px;
        color: white;
        background-color: greenyellow;
    }
</style>
</head>
<body>
    <%
         Object message = request.getAttribute("message");
         if(message!=null && !"".equals(message)){
       
    %>
         <script type="text/javascript">
              alert("<%=request.getAttribute("message")%>");
         </script>
    <%} %>
    <div align="center">
        <h1 style="color: red;">学生信息登记</h1>
        <form action="Servlet?method=sadd" method="post" >
      
            <div class="a">
                学生学号:<input type="text" id="sid" name="sid" />
            </div>
            <div class="a">
               学生姓名:<input type="text" id="sname" name="sname" />
                 </div>
                  
            <div class="a">
               学生性别:<input type="text" id="ssex" name="ssex" />
                 </div>    
                  
          <div class="a">
               学生所在班级:<input type="text" id="sclass" name="sclass" />
                 </div>  
                       
              <div class="a">
               学生所在专业:<input type="text" id="szy" name="szy" />
                 </div> 
                 
                </select>
                 </div>     
                 <center>
            <div class="a">
                <button type="submit" class="b">提  交<tton>
            </div>
            </center> 
        </form>
    </div>
     
    <script type="text/javascript">
    
     
        function check() {
             var sid = document.getElementById("sid");
            var sname = document.getElementById("sname");
            var ssex = document.getElementById("ssex");
            var sclass= document.getElementById("sclass");
            var szy = document.getElementById("szy");
              
            //非空
            if(sid.value == '') {
                alert('学号有误');
                sid.focus();
                return false;
            }
            else if(sname.value == '') {
                alert('名字有误');
                sname.focus();
                return false;
            }
            else if(ssex.value == '') {
                alert('性别有误');
                ssex.focus();
                return false;
            }
            else if(sclass.value == '') {
                alert('班级为空');
                sclass.focus();
                return false;
            }
            else if(szy.value == '') {
                alert('专业为空');
                szy.focus();
                return false;
            }
                    
              else
            {
                alert('添加成功');
                }
        }
            </script type="text/javascript">

 

posted @   小强哥in  阅读(86)  评论(0编辑  收藏  举报
编辑推荐:
· 理解Rust引用及其生命周期标识(下)
· 从二进制到误差:逐行拆解C语言浮点运算中的4008175468544之谜
· .NET制作智能桌面机器人:结合BotSharp智能体框架开发语音交互
· 软件产品开发中常见的10个问题及处理方法
· .NET 原生驾驭 AI 新基建实战系列:向量数据库的应用与畅想
阅读排行:
· C# 13 中的新增功能实操
· Ollama本地部署大模型总结
· 2025成都.NET开发者Connect圆满结束
· langchain0.3教程:从0到1打造一个智能聊天机器人
· 用一种新的分类方法梳理设计模式的脉络
点击右上角即可分享
微信分享提示