摘要: //正整数functionisPInt(str){varg=/^[1-9]*[1-9][0-9]*$/;returng.test(str);}//整数functionisInt(str){varg=/^-?\d+$/;returng.test(str);} 阅读全文