SOURCE

var a=15,b=15.5;
function isInteger(num){
    if (parseInt(num.toString())==parseFloat(num.toString())){
        document.write(num+"是整数");
    }
    else{
        document.write(num+"不是整数");
    }
var result=false;
return result;
}
isInteger(a);
isInteger(b);
console 命令行工具 X clear

                    
>
console