1 Star 0 Fork 1

yihoc/WEBWMS

forked from gujiejing/WEBWMS 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
loc.js 1.88 KB
一键复制 编辑 原始数据 按行查看 历史
wisdom 提交于 2017-11-03 23:31 . upupup new alll
window.onload = initPage;
function initPage(){
document.getElementById("addNew").onclick=addNew1;
ahrefs=document.getElementById("alldate").getElementsByTagName("a");
console.log(ahrefs.length);
for(var i=0;i<ahrefs.length;i++){
aaa=ahrefs[i];
aaa.onclick=function(){
var id1=this.id;
console.log(id1);
var strop=this.innerHTML;
if(strop=="Delete"){
console.log("Delete");
Delete1(id1);
}else if(strop=="Onhold"){
console.log("Onhold");
Onhold1(id1);
}else if(strop=="FreeHod"){
console.log("FreeHod");
FreeHod1(id1);
}else if(strop=="Modify"){
console.log("Modify");
Modify1(id1);
}
}
}
}
function Onhold1(id1){
console.log("Onhold1");
$.get("locf.php?onhold="+id1,function(data,status){
//alert("Data: " + data + "\nStatus: " + status);
var result=jQuery.parseJSON(data);
alert("服务器返回:"+result.reason);
window.location.href="loc.php";
});
}
function FreeHod1(id1){
console.log("FreeHod1");
$.get("locf.php?freehold="+id1,function(data,status){
//alert("Data: " + data + "\nStatus: " + status);
var result=jQuery.parseJSON(data);
alert("服务器返回:"+result.reason);
window.location.href="loc.php";
});
}
function Modify1(id1){
console.log("Modify1");
}
function Delete1(id1){
console.log("Delete1");
}
function addNew1(){
console.log("addNew1 ok");
addNew1Request = createRequest();
if(addNew1Request == null){
alert("Unable to create request");
}else{
var url = "locf.php?show=true"
addNew1Request.onreadystatechange = showAddNew2;
addNew1Request.open('GET',url,true);
addNew1Request.send(null);
}
}
function showAddNew2(){
if(addNew1Request.readyState == 4){
if(addNew1Request.status == 200){
console.log("OK1");
document.getElementById('showArea').innerHTML= addNew1Request.responseText;
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/yihoc/WEBWMS.git
git@gitee.com:yihoc/WEBWMS.git
yihoc
WEBWMS
WEBWMS
master

搜索帮助