HTML, Javascript. RegEx on numbers

后端 未结 1 573
你的背包
你的背包 2021-01-29 07:24

I have an input field for phone numbers. If the first number is 8, it should be automatically removed when a person types it.

If a person starts writing a number with t

1条回答
  •  清酒与你
    2021-01-29 07:46

    Amazingly, you don't need JavaScript:

    
    

    And it will work even if the user has JavaScript disabled :)

    0 讨论(0)
提交回复
热议问题