The front end Re: Verifies a significant number January 25, 2024 by 張婷婷 No Comments Var reg=/^[+-]? (\d|[1-9]\d+)(\.\d+)? $/; console.log(reg.test('0')); console.log(reg.test('00.20')) Copy the code