Make Input Type=“Password” Use Number Pad on Mobile Devices

前端 未结 7 1454
轮回少年
轮回少年 2020-11-29 23:39

On my site designed for mobile devices I have an input field that is used for PIN numbers. I want the text to be hidden as it is entered and I want the number pad to pop up

7条回答
  •  心在旅途
    2020-11-30 00:25

    Finally, I found an answer here:

    input[type=number] {
        -webkit-text-security: disc;
    }
    

    (only works in WebKit based browsers)

提交回复
热议问题