参考:
<input type="text" onblur="checkipt(this)"><script language="javascript">
function checkipt(obj){
var cs = obj.value;
cs = cs.replace(/ /g,"");
if(cs.length<1){
alert("This inputbox can not be null!");
obj.focus();
return false;
}
}
</script>