0No0.01Yes15.99Yes16Yes16.01No
温故而知新,可以为师矣。 博客:www.ouyangke.com
It’s time to do practice questions
/^((0\.((0[1-9])|([1-9]\d?)))|(([1-9]|1[0-5])(\.[\d]{1,2})?)|(16(\.0{1,2})?))$/
It can be achieved like this
var num=15.61; var t=num.toString(); if(num>0 && num<16 && t.length>0 && t.length<6){ alert(num); }
It’s time to do practice questions
It can be achieved like this