条件判断问题,不太清楚有什么区别!
不太清楚为什么这两个判断条件出的结果为什么不一样?郁闷的事……
if(document.getElementById("hidvalue").value != undefined && document.getElementById("hidvalue").value != null && document.getElementById("hidvalue").value !=="")
{
return;
}
else
{
document.getElementById("hidvalue").value = flag;
}
//---------------------------------------------------------------------
if(document.getElementById("hidvalue").value ==undefined || document.getElementById("hidvalue").value == null ||document.getElementById("hidvalue").value =="")
{
document.getElementById("hidvalue").value = flag;
}
else
{
return;
}
if(document.getElementById("hidvalue").value != undefined && document.getElementById("hidvalue").value != null && document.getElementById("hidvalue").value !=="")
{
return;
}
else
{
document.getElementById("hidvalue").value = flag;
}
//---------------------------------------------------------------------
if(document.getElementById("hidvalue").value ==undefined || document.getElementById("hidvalue").value == null ||document.getElementById("hidvalue").value =="")
{
document.getElementById("hidvalue").value = flag;
}
else
{
return;
}