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

📄 cxstu.jsp

📁 学生信息管理系统主要包括学生学籍管理
💻 JSP
字号:
<%@ page contentType="text/html; charset=GB2312"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>学生管理系统</title>
<link rel="stylesheet" type="text/css" media="all" href="./../../css/wlmx.css" title="Aq"/>
<script type="text/javascript" language="javascript">
var xmlhttp;
var modifyhttp;
var pagecount;
var px="";
function visable(){
  if(cx.style.display=="none"){
    cx.style.display="";
    ycan.value="隐藏查询"
  }else{
    cx.style.display="none"
    ycan.value="显示查询"
  }
}
function query(){
  var mc=document.getElementById("mc").value;
  var xh=document.getElementById("xh").value;
  var page=document.getElementById("page").value;
  var i = Math.floor(Math.random()*1000); 

  document.getElementById("showitem").innerHTML="";
  var querysql="?mc="+mc+"&xh="+xh+"&page="+page+"&idfs="+i;
  var HttpMethod="get";
  xmlhttp =getxmlhttp();
  if(xmlhttp){
    xmlhttp.open(HttpMethod,"/xsglxt/CxStu"+querysql,true);
    xmlhttp.onreadystatechange=getinfos;
    xmlhttp.send(null);
  }
}
function query1(){
  var mc=document.getElementById("mc").value;
  var xh=document.getElementById("xh").value;
   // var page=document.getElementById("page").value;
  document.getElementById("page").value=1;
  document.getElementById("showitem").innerHTML="";
    var i = Math.floor(Math.random()*1000); 
    var querysql="?mc="+mc+"&xh="+xh+"&page=1&idfs="+i;
  var HttpMethod="get";
  xmlhttp =getxmlhttp();
  if(xmlhttp){
    xmlhttp.open(HttpMethod,"/xsglxt/CxStu"+querysql,true);
    xmlhttp.onreadystatechange=getinfos;
    xmlhttp.send(null);
  }
}
function getxmlhttp(){
  if(window.XMLHttpRequest){
    xmlhttp=new XMLHttpRequest();
  }else if(typeof ActiveXObject != "undefined"){
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
  return xmlhttp;
}
function getinfos(){
  if (xmlhttp.readyState==4) {
    var response = xmlhttp.responseText;
    var showdiv=document.getElementById("showitem");
    var number=response.indexOf("+");
    pagecount=response.substring(0,number);
    response = response.substring(number+1,response.length);
    showdiv.innerHTML=response;
    document.getElementById("pagecount").value=pagecount;
  }
}

function remove(){
}
function frist(){
  document.getElementById("page").value=1;
  query();
}
function next(){
  var page=document.getElementById("page").value;
  if(parseInt(page)<pagecount){
    document.getElementById("page").value=parseInt(page) + 1;
    query();
  }
}
function top(){
  var page=document.getElementById("page").value;
  if(page >1){
    document.getElementById("page").value=parseInt(page) - 1;
    query();
  }
}
function last(){
  document.getElementById("page").value=pagecount;
  query()
}

function filltshowlist(){
  if (xmlhttp.readyState==4) {
    var response = xmlhttp.responseText;
    var showdiv=document.getElementById("modifyshow");
    showdiv.innerHTML=response;
  }
}
function hied(){
  document.getElementById("modifyshow").style.display="none";
}
function changpx(value){
  px=value;
}

</script>
</head>
<body>
<div class="goodsfind">
    <div class="goodsfind-help">
        <div class="goodsfind-helpL">
            <img src="./../../images/writelog-warning.gif" align="absMiddle" />
            <span>按姓名,学号查询</span>
         </div>
         <div class="goodsfind-hiden">
             <input name="ycan" type="button" value="隐藏查询" onclick="visable()"/>
         </div>
    </div>
    <div id="cx">    
        <div class="goodsfind-tools">
            <div class="G-find-list">
                 <div class="G-find-list1">
                    学生姓名:<input name="mc"/>
                </div>
                  <div class="G-find-list1">
                    学生学号:<input name="xh"/>    
                </div>
            </div>
            <div class="G-find-button">
               <a href="#" onClick="query1()">查 &nbsp;&nbsp;询</a>
          </div>
     </div>
   </div>

   <div id="showitem">
       <div class="goodsfind-body">
           <div class="goodsfind-table">
               <table class="app">
                    <tr class="datahend">
                       <c:forEach items="${topitem}" var="row" varStatus="statu">
                                 <td align="center" height="20">
                                    <c:out value="${row.value}"/>
                                 </td>
                       </c:forEach>
                    </tr>
               </table>
           </div>
           <div class="goodsfind-foot">
           </div>
        </div>
   </div>
</div>


<p align="right">
  <input type="button" onclick="frist()" value="第一页">
  <input type="button" onclick="top()" value="上一页">
  <input type="button" onclick="next()" value="下一页">
  <input type="button" onclick="last()" value="最后一页">
  &nbsp;共<input type="text" readonly="readonly" size="2" id="pagecount" />页&nbsp;
  转到第
  <input type="text" id="page" value="1" size="3"/>
  <input type="button" onclick="query()" value="提交"/>
</p>
</body>
</html>

⌨️ 快捷键说明

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