Input field value - remove leading zeros

前端 未结 8 1891
南笙
南笙 2020-11-27 06:34

I have a textbox in Javascript. When I enter \'0000.00\' in the textbox, I want to know how to convert that to only having one leading zero, such as \'0.0

8条回答
  •  温柔的废话
    2020-11-27 06:54

    You can use this code:

    
    

提交回复
热议问题