notelist_manage.jsp
来自「java jsp教程」· JSP 代码 · 共 414 行 · 第 1/2 页
JSP
414 行
<!--\webapps\jsp\notelist_manage.jsp by zhangl-->
<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="java.util.* "%>
<%@ page import="com.icss.cnpc.msgnote.vo.NoteInfo1VO"%>
<%@ page import="com.icss.j2ee.util.PageScrollUtil" %>
<%@ page import="java.sql.Timestamp" %>
<%@ page import="com.icss.cnpc.msgnote.util.DateUtility" %>
<%@ page import="com.icss.cnpc.msgnote.util.CommonUtil" %>
<%@ page import="com.icss.cnpc.msgnote.util.StringUtility" %>
<%
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
%>
<%
String contextpath = request.getContextPath();
List notelist = (List)request.getAttribute("notelist");
String cursendUnit = StringUtility.filterNullObject((String)request.getAttribute("cursendUnit"));
String curnoteTitle = StringUtility.filterNullObject((String)request.getAttribute("curnoteTitle"));
String cursendPerson = StringUtility.filterNullObject((String)request.getAttribute("cursendPerson"));
String curstatus = StringUtility.filterNullObject((String)request.getAttribute("curstatus"));
String curimpdegree = StringUtility.filterNullObject((String)request.getAttribute("curimpdegree"));
String right = StringUtility.filterNullObject((String)request.getAttribute("right"));
String userid = StringUtility.filterNullObject((String)request.getAttribute("userid"));
int currentPageNum = PageScrollUtil.getPageNum();
String pagenumber = Integer.toString(currentPageNum);
String curDate = StringUtility.filterNullObject(DateUtility.getCurrentDate());
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html;charset=GBK">
<link rel="stylesheet" href="<%=contextpath%>/css/style.css" type="text/css">
<script language="JavaScript" src="<%=contextpath%>/include/common.js"></script>
<script language=JavaScript>
function init()
{
if(!NotesList.chkbox)
{
NotesList.checkbox2.style.display = "none";
}
}
//全选按钮事件
function check(checkbox2)
{
if(NotesList.chkbox){
field = NotesList.chkbox;
if(checkbox2.checked)
{
if(field.length)
{
field[0].checked = true;
for(i=0;i<field.length;i++){
field[i].checked=true;}
checkflag="true";
return "Uncheck All";
}
else
{
field.checked = true;
checkflag="true";
}
}
else {
if(field.length)
{
for(i=0;i<field.length;i++) {
field[i].checked=false;}
checkflag="false";
return "Check All";
}
else
{
field.checked = false;
checkflag="false";
}
}
}
}
//当用户先前已选择全选框,后取消其中一个消息复选框时,判别全选框的状态是否应改变
function _operJudge(field,checkbox2)
{
var flag1 = "true";
if(!field.length)
{
if(!field.checked && !field.disabled)
flag1 = "false";
}
for(i=0;i<field.length;i++){
if(!field[i].checked && !field[i].disabled)
flag1 = "false";
}
if(flag1 == "false")
checkbox2.checked = false;
else
checkbox2.checked = true;
}
//删除操作
function _operate(flag)
{
if(!NotesList.chkbox)
{
alert("没有可以删除的消息!");
return false;
}
var str=null;
var i = null;
var isChecked =false;
var isConfirm=false;
var name = NotesList.chkbox;
if(name.length){
for(i=0;i<name.length;i++)
{
if(name[i].checked==true)
{
isChecked=true;
}
}
}
else
{
if(name.checked == true)
isChecked = true;
else
isChecked = false;
}
if(isChecked)
{
if(window.confirm("您确定要删除吗?"))
{
NotesList.operate.value =flag;
NotesList.action="<%=contextpath%>/servlet/NoteManageOperServlet";
NotesList.submit();
}
}
else{alert("您还未选定目标!");}
}
function query()
{
if(NotesList.right.value == 3){
NotesList.action = "<%=contextpath%>/servlet/NoteManageListServlet";
NotesList.submit();}
if(NotesList.right.value == 1){
NotesList.action = "<%=contextpath%>/servlet/MyNoteInfoServlet";
NotesList.submit();}
}
function clearAll()
{
NotesList.noteTitle.value = "";
if(NotesList.sendUnit)
NotesList.sendUnit.value = "";
NotesList.status.options[0].selected = true;
if(NotesList.sendPerson)
NotesList.sendPerson.value = "";
NotesList.impdegree.options[0].selected = true;
}
function update(flag,CurID,state)
{
NotesList.operate.value=flag;
NotesList.ID.value=CurID;
NotesList.state.value=state;
document.NotesList.action="<%=contextpath%>/servlet/NoteManageOperServlet";
document.NotesList.submit();
}
function add(flag)
{
NotesList.operate.value=flag;
document.NotesList.action='<%=contextpath%>/servlet/NoteManageOperServlet?operate='+NotesList.operate.value+'&right='+<%=right%>;
document.NotesList.submit();
}
function reset()
{
NotesList.noteTitle.value="";
NotesList.sendUnit.value="";
NotesList.sendPerson.value="";
}
function viewreader(flag,CurID)
{
NotesList.operate.value=flag;
NotesList.ID.value=CurID;
window.open("<%=contextpath%>/servlet/NoteManageOperServlet?ID="+NotesList.ID.value+"&operate="+NotesList.operate.value,'基本信息','width=800,height=600,SCROLLBARS=1');
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?