Javascript asks for a password (i.e. *******)

I am writing a bookmarklet, and I need to ask the user to enter a password. However, I do not want it to be in clear text on the screen, so I cannot use the tooltip.

Is there a hidden alternative to query ()?

Any other suggestion?

+3
source share
4 answers

You can create a floating div on the current page with a form containing a password field.

+4
source

Alternative: Let the letter symbol point to a specific web page. Get the password from the user on this page and continue.

javascript , , , . javascript, javascript (window.open), form input submit -.

, , , . .

JRH

+2

- Thickbox :

<a href="iframeModal.html?placeValuesBeforeTB_=savedValues&TB_iframe=true&height=200&width=300&modal=true" title="add a caption to title attribute / or leave blank" class="thickbox">Open iFrame Modal</a>
+1

Easy, quick answer: No, there is no cross-browser method, such as window.prompt (), that masks user input. However, there are some proprietary materials that you could study. In MSIE you got window.createPopup (), window.showModalDialog (), and window.showModelessDialog (). However, I do not recommend using this approach = P

What happens if you use HTTP authentication for your destination? Will the UA ask the user using un / pw?

+1
source

Source: https://habr.com/ru/post/1710990/


All Articles