Javascript - Masking a password on a JS alert box - Stack Overflow

I have the followingvar validate=prompt("Enter your PIN","Enter your PIN");This wor

I have the following

var validate=prompt("Enter your PIN","Enter your PIN");

This works fine except it shows the password when typing it.

Is there any way to mask the password being entered?

Cheers,

I have the following

var validate=prompt("Enter your PIN","Enter your PIN");

This works fine except it shows the password when typing it.

Is there any way to mask the password being entered?

Cheers,

Share Improve this question asked Feb 27, 2011 at 6:22 CecilCecil 1,6195 gold badges21 silver badges26 bronze badges 1
  • don't do password validation through client side...it's just fail in so many ways. – KJYe.Name Commented Feb 27, 2011 at 6:30
Add a ment  | 

3 Answers 3

Reset to default 3

Nope, there is no way to mask prompt box. You will have to use some other custom solution or use password input box instead.

If you want to do validation of password, do it on the server-side not client-side.

If you really want a prompt window and accept a password, you might want to use this plugin along with jquery. Check out example 9 on http://trentrichardson./Impromptu/index.php and use type="password" instead.

It's impossible to hide the password.JS load on the client side. We can easily find the password by checking the source code.

Here is an example. Check it out yourself http://www.pageresource./jscript/jpass.htm

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744889305a4599306.html

相关推荐

  • Javascript - Masking a password on a JS alert box - Stack Overflow

    I have the followingvar validate=prompt("Enter your PIN","Enter your PIN");This wor

    2天前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信