operatejournal1.jsp

来自「OA自动化办公系统,Eclipse+Oracle开发。」· JSP 代码 · 共 146 行

JSP
146
字号
<%@ page contentType="text/html; charset=GBK" language="java" import="java.sql.*" errorPage="" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<title>操作日志</title>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/calendar.js">
</script>
<script type="text/javascript" language="javascript">
       var http=false;       
       function createHttpRequest(){
           if(window.XMLHTTPRequest){
               http=new XMLHTTPRequest();
               if(http.overrideMimeType){
                   http.overrideMimeType('text/xml');
               }
           }else{
                   try{
                       http=new ActiveXObject('Microsoft.XMLHTTP');
                   }catch(E){
                       try{
                           http=new ActiveXObject('Msxml2.XMLHTTP');
                          }catch(e){
                           http=false;
                          }
                   }
               }
        }
        
        function check(obj){
            var starttime=obj.logintime.value;
            var endtime=obj.logouttime.value;
            if(starttime==''||endtime==''){
                return false;
            }
            send(starttime,endtime);
            return false;
        }
          

        
		function send(value1,value2){
		   createHttpRequest();
		if(!http){
		 	return false;
		}else {
		http.onreadystatechange = processResponse;
		http.open('GET','searchoperatelog.do?startTime='+value1+'&endTime='+value2,true)
		http.send(null);
		}
		}
	
	
		function processResponse()	{	
			if(http.readyState == 4){
			if(http.status == 200)
			{
			document.getElementById('divdep').style.display='block';
			var table = document.getElementById('operateList');	
				while(table.rows.length>1){
						table.deleteRow(1);
				}
				var dom = http.responseXML;
				var list = dom.selectNodes('/root/operateList');
				
				for(i = 0;i<list.length;i++){
					var row = table.insertRow(i+1);					
					var columns = list[i].childNodes;	
				
					var col = row.insertCell(0);
					col.setAttribute('align','center');
					col.setAttribute('style','font-size:12px');
					col.innerHTML = "<a href = 'deleteoperatelog.do?id="+columns[0].text+"'><img style='border:none;' src='../images/delete.gif'/></a>";
					var col = row.insertCell(1);
					col.setAttribute('align','center');
					col.innerText = i+1;	
					for(j = 2;j < columns.length+1;j++){
				
					 		var col = row.insertCell(j);
					 		col.setAttribute('align','center');
					 		col.innerText = columns[j-1].text;
					 		
					}
							
				}
				
			}
		}
	}
function fill(myid){
		var id = document.getElementById("id");
    	id.value=myid;
}	
</script>
</head>

<body>
<table width="100%"  border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td  height="50" colspan="3" valign="top" ><p style="font-size:12px">目前位置:操作日志
      
    </p></td>
  </tr>
   <tr>
    <td height="71" colspan="3" align="center" valign="top"><p><strong>操作日志</strong></p>
      <hr  width = "100%" />
      <p>&nbsp;</p></td>
  </tr>
  <tr>
    <td height="118" colspan="3" align="center" valign="top" >
    <form action="" method="GET" onsubmit="return check(this)">
      <span style="font-size:12px">输入时间段:</span>
      <label>
        <input name="logintime" onFocus="calendar()" type="text" class="inputCss" />
        ---
        <input name="logouttime" onFocus="calendar()" type="text" class="inputCss" />
        </label>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <input type="image" src="../images/search.gif" style="width:100px; height:21px" />
        <p>&nbsp;</p> 
		<div id="divdep" style="display:none" >
		<input onclick="javascript:window.location='operatelogdeleteall.do'" name="submit" type="button" value="删除所有记录" class="buttonCss">

      <p>&nbsp;</p>
        <p>&nbsp;</p>
        <table id="operateList" width="100%" border="0"   style="font-size:12px" >
          <tr class="headerCenter" >
            <th>删除</th>
            <th>序号</th>
            <th>操作用户</th>
            <th>操作时间</th>
            <th>操作事件</th>
            <th>操作描述</th>         
          </tr>
     </table>
     </div>
     <input name="id" id="id" type="hidden" value="" />           
    </form>
    </td>
 	</tr>
	</table>
	</body>
	</html>

⌨️ 快捷键说明

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