Unmask textbox password with Javascript or jQuery - Stack Overflow

I have a textbox for user to enter positive integer. User enters a lot of entries many times. Overtime,

I have a textbox for user to enter positive integer. User enters a lot of entries many times. Overtime, textbox has list of previous entries, when you start typing something similar to previous entry. Sometimes, user accidentally select those previous entries. I know this one of browser's features.

Is there anyway to clear these previous entries from javascript, or jQuery?

So, I'm thinking of using textbox (password mode) then unmask it with Javascript or jQuery. I think browser won't keep anything if textbox is for password.

How can I unmask textbox password with Javascript or jQuery if it's the right approach for this problem?

What I'm doing is to clear the history of the textbox I have on an ASPX page.

Thank you.

I have a textbox for user to enter positive integer. User enters a lot of entries many times. Overtime, textbox has list of previous entries, when you start typing something similar to previous entry. Sometimes, user accidentally select those previous entries. I know this one of browser's features.

Is there anyway to clear these previous entries from javascript, or jQuery?

So, I'm thinking of using textbox (password mode) then unmask it with Javascript or jQuery. I think browser won't keep anything if textbox is for password.

How can I unmask textbox password with Javascript or jQuery if it's the right approach for this problem?

What I'm doing is to clear the history of the textbox I have on an ASPX page.

Thank you.

Share Improve this question edited Jul 31, 2012 at 11:14 Rustam 1,9232 gold badges16 silver badges35 bronze badges asked Oct 1, 2010 at 8:33 NarazanaNarazana 1,95015 gold badges57 silver badges88 bronze badges
Add a ment  | 

4 Answers 4

Reset to default 5

I think you are talking about the autoplete feature - the browser gives a list of entries entered previously.

If you don't want it, then simple use autoplete="off". There is no need of javascript (and therefore jquery)

Autoplete can be turned off for one particular field or for an entire form.

<form name="form1" id="form1" method="post" autoplete="off">  

<input type="text" name="text1" autoplete="off">

But remember: This is a very useful feature, before turning it off make sure that it is essential to turn it off

If you have a master page, you can turn form autoplete off like in the child page that you have that Textbox control on like this:

On page load event:

 >Me.Form.Attributes.Add("autoplete", "off")

Also add this attribute to your Textbox AutoCompleteType="Disabled"

Do you want to change the input type from password to text ?

$('#yourField').attr('type', 'text')

You can't change the "type" attribute. There is some jquery plugins for that.

This one is very simple to use: http://unwrongest./projects/show-password/

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

相关推荐

  • Unmask textbox password with Javascript or jQuery - Stack Overflow

    I have a textbox for user to enter positive integer. User enters a lot of entries many times. Overtime,

    23小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

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

关注微信