📄 sendjob.jsp
字号:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="template" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
<head>
<html:base />
<title>SendJob.jsp</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script type="text/javascript">
var http_request = false;
function send_request(url) {//初始化、指定处理函数、发送请求的函数
http_request = false;
//开始初始化XMLHttpRequest对象
if(window.XMLHttpRequest) { //Mozilla 浏览器
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {//设置MiME类别
http_request.overrideMimeType("text/xml");
}
}
else if (window.ActiveXObject) { // IE浏览器
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) { // 异常,创建对象实例失败
window.alert("不能创建XMLHttpRequest对象实例.");
return false;
}
http_request.onreadystatechange = processRequest;
// 确定发送请求的方式和URL以及是否同步执行下段代码
http_request.open("GET", url, true);
http_request.send(null);
}
// 处理返回信息的函数
function processRequest() {
if (http_request.readyState == 4) { // 判断对象状态
if (http_request.status == 200) { // 信息已经成功返回,开始处理信息
var result=http_request.responseXML.getElementsByTagName("base");//处理删除后的返回结果
var div1=document.getElementById("myTableDiv");//得到显示table的层
var content="";
content+="<table class='query_form_table'><tbody>";
content+="<tr><th>职位名称";
content+="</th><th>所属机构";
content+="</th><th>最新发布日";
content+="</th><th>截止日";
content+="</th><th>操 作";
content+="</th></tr>";
for(var i=0;i<result.length;i++){
content+="<tr id='_Item_Index_0'>";
content+="<td>"
content+=result[i].childNodes[1].childNodes[0].nodeValue;
content+="</td>";
content+="<td>"
content+=result[i].childNodes[2].childNodes[0].nodeValue;
content+="</td>";
content+="<td>"
content+=result[i].childNodes[3].childNodes[0].nodeValue;
content+="</td>";
content+="<td>"
content+=result[i].childNodes[4].childNodes[0].nodeValue;
content+="</td>";
content+="<td><a href='javascript:Delete("+result[i].childNodes[0].childNodes[0].nodeValue+");'>";
content+="删除</a> ";
content+="<a href='javascript:Rollback("+result[i].childNodes[0].childNodes[0].nodeValue+");'>还原";
content+="</a>";
content+="</td>";
content+="</tr>";
document.getElementById("pageResult.totalCount").innerHTML=result[i].childNodes[5].childNodes[0].nodeValue;
document.getElementById("pageResult.pageSize").value=result[i].childNodes[6].childNodes[0].nodeValue;
document.getElementById("pageResult.pageNo").value=result[i].childNodes[7].childNodes[0].nodeValue;
document.getElementById("pageResult.pageCount").innerHTML=result[i].childNodes[8].childNodes[0].nodeValue;
}
content+="</tbody></table>";
div1.innerHTML=content;
}
}
}
function Delete(vl)
{
if(!confirm('确认删除这一条记录?'))
{
return;
}
else
{
var vl=vl+",";
send_request("/ChinaHR/doJob.do?operate=doDrop&oper=delete&jobId="+vl);
}
}
</script>
<link rel="stylesheet" href="css/style-new.css" type="text/css"></link>
</head>
<body>
<html:form action="/doJob.do" method="post">
<div id="myTableDiv">
<table class="query_form_table">
<tr><th>职位名称</th><th>所属机构</th><th>最新发布日</th><th>截止日</th><th>操作</th></tr>
<logic:notEmpty name="jobForm" property="pageResult.list">
<logic:iterate id="Job" name="jobForm" property="pageResult.list"
type="com.chinahr.pojo.SysJobInfo">
<tr><td>${Job.jobName}</td><td>${Job.userCompany.name}</td><td>${Job.releaseDate}</td><td>${Job.endDate}</td><td><a href="javascript:Delete(${Job.jobId});">删除</a> <a href="javascript:window.alert('未开通此功能!');">查看</a></td></tr>
</logic:iterate>
</logic:notEmpty>
</table>
</div>
</html:form>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -