代码拉取完成,页面将自动刷新
window.onload=initPage;
function initPage(){
ahrefs = document.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"){
fnDel2(id1);
}
}
}
}
function fnDel(id1){
//alert("del:"+id1);
fnDelRequeest = createRequest();
if(fnDelRequeest == null){
alert("Unable to create request");
}else{
var url = "delslso.php?id="+id1;
fnDelRequeest.onreadystatechange = showfnDel;
fnDelRequeest.open('GET',url,true);
fnDelRequeest.send(null);
}
}
function showfnDel(){
console.log("showfnDel");
if(fnDelRequeest.readyState==4){
if(fnDelRequeest.status==200){
console.log("fnDelRequeest->"+fnDelRequeest.responseText);
var respText=eval("("+ fnDelRequeest.responseText +")");
if(respText.result==0){
alert("错误,原因为:"+respText.reason);
}else if(respText.result==1){
alert("删除成功:"+respText.reason);
window.location.href="showlistso.php";
}
}
}
}
function fnDel2(id1){
console.log(id1);
//$("div#dialog").innerHTML="aaaaaaaaaaaaaaaaaaaa";
$("div#dialog").html("<h2>是否删除此出库单ID:"+id1+"</h2>");
$(function() {
$("#dialog").dialog({
position: ["center","top"],
resizable: false,
modal: true,
height:200,
buttons: {
Ok: function(){
$(this).dialog("close");
fnDel(id1);
},
Cancel: function(){
$(this).dialog("close");
}
}
});
});
}
/**
$(function() {
$( "#dialog" ).dialog();
});
*/
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。