开发者

Autocomplete disabled in a prompt

开发者 https://www.devze.com 2023-03-05 23:41 出处:网络
I am currently working on a webapp for iPhone with PhoneGap. I am creating a game where players have to remember their vocabulary. In a part of my code, the iPhone is displaying a prompt in js and the

I am currently working on a webapp for iPhone with PhoneGap. I am creating a game where players have to remember their vocabulary. In a part of my code, the iPhone is displaying a prompt in js and the player has to write a word correctly. My code :

var motPense = prompt('Which word are you thinking about ' + localStorage.joueur2 +' ?');

As I am working in a game where you have to remember your vocabulary, I want to disable "Autocapitalize", "Autocomplete" and "Autocorrect" such as in an input like this:

<input type="text" autocorrect="off" autocapitalize="off">

Is there any way to do this in a prompt, or I will have to display a with an input inside?

Thank you.

PS : Sorry for my approximati开发者_JS百科ve english


You'll have to build your own prompt out of DOM elements; a normal JavaScript prompt() is generated with native code that you can't style or modify.

0

精彩评论

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

关注公众号