任何人都可以帮助我理解为什么"否则"这部分代码没有执行? 当变量彼此相等时,出现警告框,当变量不相同时,else部分不执行,但是如果我编辑掉所有,并保留代码的其他部分,它就可以工作
$(document).on("click","."+deletebutton,function(){
var id = $(this).attr("id");
if(id){
if(name1 == p_name){
alert("I am an alert box!");
}
else{
if(confirm("A League Fee of 14% will be deducted from each players bet amount. This fee is non refundable after you accept. Do you really want to Accept this Match ?"))
ajax("rid="+id,"del");
}
}
});