开发者

Don't show keyboard on iOS

开发者 https://www.devze.com 2023-04-04 11:44 出处:网络
Is there a way to NOT show the on 开发者_运维问答screen keyboard on a website (loaded in safari) when a user clicks on an input type=\"text\" field?I have javascript written to popup a mini \"keypad\"

Is there a way to NOT show the on 开发者_运维问答screen keyboard on a website (loaded in safari) when a user clicks on an input type="text" field? I have javascript written to popup a mini "keypad" which I'd like to use instead.


I guess you could try to set the input disabled (disabled="disabled"), show your popup on click and finally update the field content via JS.


You cannot change device behavior from your javascript or website. Especially not if the user has disabled javascript.

The only thing you could do is to allow for all inputs and do server side validation to exclude the phrases or characters you do not wish to be entered.

HTH


In a custom app of course you can. In safari I don't think so.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号