Reserve zero as first character of HTML input
P粉014218124
P粉014218124 2023-09-06 11:04:32
0
1
420

So I have a problem with HTML input in Vue. Whenever I try to enter with zero as the first character, the input value changes. For example, if I want to enter '005', it will become '5', and similarly for '05' it will become '5'. I've tried looking up information about it, but all I've found is how to implement it, not how to prevent it. Any ideas?

I tried using e.preventDefauld(), but e is not defined. I also tried converting the number to a string on input.

P粉014218124
P粉014218124

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!