How to hide the last digit when I type in the password on my website in iOS

I have an input tag with a password type on my website.

<input type="password">

With an iPad or iPhone, the last letter is always displayed when entering a password.

My problem is that I am doing a lot of demos of my website with an iPad.

I don’t want the iPad to show the last letter when I type in my password.

Can I fix this by changing something on my website?

+5
source share
4 answers

The “simplest” thing is probably to create a user input that listens for keys and stores the actual key values ​​with a simple • or * display in the field.

* , , .

, , , , . backspace .., . : http://jsfiddle.net/d94P5/

<input type="text" id="password">
<input type="text" id="hiddenValue">​

Javascript

var field = document.getElementById("password")
var realValue = "";
field.onkeydown = function(evt){
    realValue += String.fromCharCode(evt.keyCode)      
    this.value = realValue.replace(/./g,"*");      
    document.getElementById("hiddenValue").value = realValue

    return false;   
}
+1

, iOS , , .

, . -, , "demo" , .

"demo" ( ), ( ..), "demo" / , , ?

, , , , , , , !

+2

iOS ( iTunes).

, pwSafe, , ? , - .

enter image description here

+2

Perhaps create a temporary password for a fictitious account with strictly limited access and configure your site to automatically disable this account and expire the password at the end of your demo hour.

0
source

All Articles