<script language="javascript"> Object.prototype.isInteger = function () { return (this.toString().search(/^-?[0-9]+$/) == 0 ) //回傳值為true/false } var myNum=1235.6; alert (myNum.isInteger()); </script>
沒有留言:
張貼留言