1 Star 1 Fork 1

gujiejing / WEBWMS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
slasn.js 1.20 KB
一键复制 编辑 原始数据 按行查看 历史
wisdom 提交于 2017-11-03 23:31 . upupup new alll
window.onload = initPage;
function initPage(){
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 == "DEL"){
fnDel(id1);
}else{
fnModify(id1);
}
}
}
}
function fnDel(id1){
//alert("del:"+id1);
fnDelRequeest = createRequest();
if(fnDelRequeest == null){
alert("Unable to create request");
}else{
var url = "delslasn.php?id="+id1;
fnDelRequeest.onreadystatechange = showfnDel;
fnDelRequeest.open('GET',url,true);
fnDelRequeest.send(null);
}
}
function showfnDel(){
if(fnDelRequeest.readyState==4){
if(fnDelRequeest.status==200){
console.log("ok");
var test1=fnDelRequeest.responseText;
console.log(test1);
//document.getElementById('showMessage').innerHTML=fnDelRequeest.responseText;
document.getElementById('dialog').innerHTML=test1;
$(function() {
$( "#dialog" ).dialog();
});
}
}
}
function fnModify(id1){
console.log(id1);
window.location.href="slasnform.php?ID="+id1;
}
PHP
1
https://gitee.com/laotou99_admin/WEBWMS.git
git@gitee.com:laotou99_admin/WEBWMS.git
laotou99_admin
WEBWMS
WEBWMS
master

搜索帮助