23.4.20每日总结

<%@ page import="java.util.Calendar" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
 
    pageEncoding="UTF-8"%>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
<html>
<head>
         <title>教学管理系统</title>
         <style type="text/css">
body {
 Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; color: rgb(51, 51, 51); margin: 0px !important; padding: 0px 1em !important; border-radius: 0px !important; background-image: none !important; background-position: initial !important; background-size: initial !important; background-repeat: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; border: 0px !important; inset: auto !important; float: none !important; height: auto !important; line-height: 1.8em !important; outline: 0px !important; overflow: visible !important; position: static !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; min-height: auto !important; white-space: nowrap !important;">}        
table {
    /*表格边框为实线或者是空心双线*/
    border-collapse: collapse;
    /*边框与边框的空间*/
    border-spacing: 0;
    padding: 40px ;
}
 
a {
    color: rgb(60, 114, 53);
    text-decoration: none;
    font-size: 12px;
}
 
a:hover {
    color: rgb(60, 114, 53);
    text-decoration: underline;
    font-size: 12px;
}
 
a:visited {
    color: rgb(0, 106, 78);
    font-size: 12px;
}
/*整个tab层居中,宽度为600px*/
#tabDiv {
    width: 600px;
    height:500px;
    margin: 1em auto;
    padding-bottom: 10px;
    border-right: rgb(30,144,255) 2px solid;
    border-top: rgb(30,144,255) 2px solid;
    border-left: rgb(30,144,255) 2px solid;
    border-bottom: rgb(30,144,255) 2px solid;
    background: #ffffff;
}
/*tab头的样式*/
#tabsHead {
    padding-left: 0px;
    height: 26px;
    
    font-size: 1em;
    margin: 1px 0px 0px;
    color: rgb(179, 247, 19);
    line-height: 26px;
}
/*已选tab头(超链接)的样式*/
.curtab {
    padding-top: 0px;
    padding-right: 10px;
    padding-bottom: 0px;
    padding-left: 10px;
    border-right: rgb(209, 226, 49) 1px solid;
    font-weight: bold;
    float: left;
    cursor: pointer;
    background: #ffffff;
}
/*未选tab头(超链接)的样式*/
.tabs {
    border-right: rgb(209, 226, 49) 1px solid;
    padding-top: 0px;
    padding-right: 10px;
    padding-bottom: 0px;
    padding-left: 10px;
    font-weight: normal;
    float: left;
    cursor: pointer;
}
p {
    font-size: 12pt;
    text-indent: 2em;
}
li {
    border-bottom-style: solid;
    border-bottom-color: #EEE;
    border-bottom-width: thin;
    height: 25px;
    font-family: "宋体";
    font-size: 20pt;
}
</style>
<script type="text/jscript"> 
        //显示tab(tabHeadId:tab头中当前的超链接;tabContentId要显示的层ID)
        function showTab(tabHeadId,tabContentId)
        {
            //tab层
            var tabDiv = document.getElementById("tabDiv");
            //将tab层中所有的内容层设为不可见
            //遍历tab层下的所有子节点
            var taContents = tabDiv.childNodes;
            for(i=0; i<taContents.length; i++)
            {
                //将所有内容层都设为不可见
                if(taContents[i].id!=null && taContents[i].id != 'tabsHead')
                {
                    taContents[i].style.display = 'none';
                }
            }
            //将要显示的层设为可见
            document.getElementById(tabContentId).style.display = 'block';         
            //遍历tab头中所有的超链接
            var tabHeads = document.getElementById('tabsHead').getElementsByTagName('a');
            for(i=0; i<tabHeads.length; i++)
            {
                //将超链接的样式设为未选的tab头样式
                tabHeads[i].className='tabs';
            }
            //将当前超链接的样式设为已选tab头样式
            document.getElementById(tabHeadId).className='curtab';
            document.getElementById(tabHeadId).blur();
        }
</script>
<script>
function startTime(){
    var today=new Date();
    var h=today.getHours();
    var m=today.getMinutes();
    var s=today.getSeconds();// 在小于10的数字前加一个‘0’
    m=checkTime(m);
    s=checkTime(s);
    document.getElementById('txt').innerHTML=h+":"+m+":"+s;
    t=setTimeout(function(){startTime()},500);
}
function checkTime(i){
    if (i<10){
        i="0" + i;
    }
    return i;
}
</script>
</head>
<body onload="startTime()">
 
<%
    Date ddl = new Date(100);
    String a=null;
    //评分转为字符串类型
    boolean flag=true;
    //是否已经提交
    if(flag)
    {%>
<h1 align="center">作 业 提 交</h1>
<div style="font-size:20px;text-align:center;" id="txt"></div>
<br>
<form action="" method="get">
    <table cellspacing="10" id="tabDiv" border="1" style=";font-size:18px;width:600px">
        <tr>
            <td align="center" colspan="2" style="height:30px;font-size:18px">
            标题:<%out.print("哥哥的蛋怎么做最好吃"); %>
            </td>
        </tr>
        <tr>
            <td align="center" style="height:30px">
            截止时间为:<%
            SimpleDateFormat f = new SimpleDateFormat(" yyyy年MM月d日 HH:mm");
            out.println(f.format(ddl)); %>
            </td>
            <td style="height:30px">
            <input type="file" name="file" id="f"/>
            </td>
        </tr>
        <tr>
            <td align="center" colspan="2">
            作业要求为:
            <%out.print("尽量不要抄袭,可以瞎编"); %>
            <textarea rows="8" cols="30" name="" style="font-size:25px;margin:10px 15px"></textarea>
            </td>
        </tr>
        <tr>
         
            <td align="center" colspan="2" style="height:30px">
             
            <%
            Date date=new Date(110);
            if(date.after(ddl)){
                out.print("已截止不可提交");
            }
            else{ %>
            <input type="submit" value="提交" style="font-size:14px;margin:5px 10px"/>
            <input type="reset" value="重置" style="font-size:14px;margin:5px 10px"/>
             
            <%} %>
            </td>
        </tr>
    </table>
    </form>
    <%}
    if(a==null)
         
    %>
<script type="text/javascript">
    var f=document.getElementById("f");
    f.onclick=function(){
        alert('将作业打包成一个ZIP再传入');
    }
</script>
</body>
</html>
posted @ 2023-04-20 21:23  白泽的格物志  阅读(35)  评论(0)    收藏  举报