jQuery 教程
jQuery 雜項(xiàng)方法
判斷輸入值類型
$.isNumeric() 函數(shù)用于判斷指定參數(shù)是否是一個(gè)數(shù)字值。
注意:在jQuery 3.0中,$.isNumeric()方法只有接收number類型的參數(shù),或者是可以被強(qiáng)制為有限數(shù)值的 string類型的參數(shù)時(shí),才會(huì)返回true,否則返回false。