-3
data1变量包含“NotExist”字符串但执行else语句。如果else语句没有给出预期结果
if(data1=="NotExist")
{ document.getElementById("errcorrectwfrm").style.display="inline";
return false;
}
else{ alert("Thanks for choosing albc,now you can go ahead");
$.modal.close();
}
'data1 variable contanins“NotExist”'? “data1”的实际值是什么 - 因为你检查的是否相等,它必须是正确的'NotExist',就像'data ='NotExist''不是'data1 ='soemvalue NotExist'' –
你可以添加_complete_和_relevant_代码 – Tushar
请提供完整的代码。 –