📄 jobbogsortpage.jsp
字号:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="logic" uri="/WEB-INF/struts-logic.tld"%>
<jsp:include flush="true" page="../../head/chinahrhead.jsp"/>
<html>
<head>
<title>职位大类别管理</title>
<link rel="stylesheet" href="/ChinaHR/css/admin.css" type="text/css"></link>
<script type="text/javascript">
function dodel(txtName,Id)
{
var temp=window.confirm('是否删除: '+txtName);
if(temp==true)
{
window.location="?oper=dodel&Id="+Id;
}
}
function doup(txtName,Id)
{
document.getElementById("doin").style.display="none";
var temp=window.confirm('是否修改: '+txtName);
if(temp==true)
{
MytextId=document.getElementById("lblId");
MytextId.value=Id;
MytextName=document.getElementById("textname");
MytextName.value=txtName;
document.getElementById("doup").style.display="";
}
}
function doAdd()
{
document.getElementById("doup").style.display="none";
document.getElementById("doin").style.display="";
}
//修改
function dosub()
{
url="JobSort.do?oper=doupdate&Id="+document.getElementById("lblId").value+
"&nm="+document.getElementById("textName").value+"&a="+Math.random();
escape(url);
con="div"+document.getElementById("lblId").value;
GetBegin(url,con);
}
//插入
function dosubin(){
url="JobSort.do?oper=doinsert&nm="+document.getElementById("addname").value+"&a="+Math.random();
escape(url);
GetAddBegin(url,'tabcont','cur');
}
function getUp()
{
curpage=document.getElementById("cur1").value;
cuppage=parseInt(curpage)-1;
url="page.do?oper=dobogsort&cur="+cuppage+"&rom"+Math.random();
goup(url,'tabcont','cur');
}
function getdown()
{
curpage=document.getElementById("cur1").value;
cuppage=parseInt(curpage)+1;
url="page.do?oper=dobogsort&cur="+cuppage+"&rom"+Math.random();;
godown(url,'tabcont','cur');
}
</script>
<script type="text/javascript" language="javascript" charset="utf-8" src="/ChinaHR/myjs/myajax.js" ></script>
<script type="text/javascript" language="javascript" charset="utf-8" src="/ChinaHR/myjs/pageajax.js"></script>
</head>
<body >
<div class="level2Bg">
<a href="javascript:doAdd()">增加</a>
</div>
<br/>
<div Id="tabcont">
<table align="center" width="86%" cellSpacing=1 cellPadding=0 class="table2" >
<caption style="background-color: #E2E2DE; font-weight: bold;">职位大类型列表</caption>
<logic:notEmpty name="bogsort" scope="session">
<logic:iterate id="temp" name="sort" scope="session" type="com.chinahr.pojo.JobBogSort">
<tr onmouseover="curcolor=this.style.backgroundColor;this.style.backgroundColor='#f0f0f0';" onmouseout="this.style.backgroundColor=curcolor;">
<th width="20%" >职位大类别编号:</th>
<td width="20%" >${temp.id }</td>
<th width="20%" >职位大类别名称:</th>
<td width="20%" ><div id="div${temp.id }">${temp.name }</div> </td>
<th width="20%" align="center">
<input type="button" value="删除" onclick="return dodel('${temp.name }','${temp.id}')">
<input type="button" value="修改" onclick="return doup('${temp.name }','${temp.id }')">
</th>
</tr>
</logic:iterate>
</logic:notEmpty>
</table>
</div>
<div>
<table width="350" align="center" cellSpacing=1 cellPadding=0>
<tr>
<logic:notEmpty name="pagebean" scope="session">
<td>
<div id="cur">
<input type="hidden" Id="cur1" value="${pagebean.curPageCount }">
当前是${pagebean.curPageCount }页
一共${pagebean.totalPageCount}页
每页${pagebean.perPageLine}行
一共${pagebean.totalLineCount}行
</div>
</td>
<td><input type="button" value="上一页" onclick="javascript:getUp()"></td>
<td><input type="button" value="下一页" onclick="javascript:getdown()"></td>
</logic:notEmpty>
</tr>
</table>
</div>
<br>
<br>
<br>
<br>
<div Id="doup" align="center" style="display:none" >
<table class="table2" cellSpacing=1 cellPadding=0>
<caption style="background-color: #D9E3F7;font-weight: bold;" >修改职位大类别信息</caption>
<tr>
<th>职位大类别编号:</th>
<td><input id="lblId" type="text" style="border: none" readonly="readonly"></td>
</tr>
<tr>
<th>职位大类型名称:</th>
<td><input type="text" Id="textname"></td>
</tr>
<tr>
<td align="center"><input type="button" value="确定" onclick="dosub()"></td>
<td align="center"><input type="button" value="取消" onclick="document.getElementById('doup').style.display='none'"></td>
<td></td>
</tr>
</table>
</div>
<div Id="doin" align="center" style="display:none" >
<table class="table2" cellSpacing=1 cellPadding=0>
<caption style="background-color: #D9E3F7;font-weight: bold;" >增加职位类别信息</caption>
<tr>
<th>职位大类别编号:</th>
<td><input id="txtId" type="text" style="border: none" readonly="readonly"></td>
</tr>
<tr>
<th>职位大类型名称:</th>
<td><input type="text" Id="addname"></td>
</tr>
<tr>
<td align="center"><input type="button" value="确定" onclick="dosubin()"></td>
<td align="center"><input type="button" value="取消" onclick="document.getElementById('doin').style.display='none'"></td>
<td></td>
</tr>
</table>
</div>
<%session.removeAttribute("bogsort"); %>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -