js 区分整数和小数

function isInt(x) {
    return x % 1 === 0
} 

 

posted @ 2021-09-28 15:10  芬尼克斯  阅读(137)  评论(0)    收藏  举报