jeudi 2 avril 2015

If Statement issue or operator issue

Need help to find out what wrong has happened?.. resulting output not cover less then condition. Operator in java script not working or if else is not working... please help



function set_shield(t_value){

var shield = document.getElementById('set_shield');
if(shield.value==0){
alert('Keep Enter a Value')
exit ;
}

else if(isNaN(shield.value))
{
alert('Keep Enter Only numeric value')
exit ;
}
else if(t_value < shield.value){
alert('gf')
exit ;
}
else{

var ok = confirm("Are you sure want Lock Value?")
if (ok)
{
alert("I am an alert box!");


}
else{
exit ;
}

}
}

Aucun commentaire:

Enregistrer un commentaire