<script>

if(typeof(a) == “undefined”){

alert(‘undefined valiable’);

}

else {

alert(‘OK’);

}

</script>