title: Javascript or JQuery Password Prompt
body: <p>I've found similar questions on the net, but not a viable solution to them. </p>
  
  <p>My question, as the title suggests, is how could I leverage jQuery or Javascript to create a <strong>password prompt</strong> when, for example, a button is clicked.</p>
  
  <p>So the following, but instead of showing the text, I'd like the text field act as a password field.</p>
  
  <pre><code>var pass1 = 'hello123';
  password=prompt('Please enter password to view page')    
  if (password==pass1)
     alert('password correct! Press ok to continue.')
  </code></pre>
  
  <p>I want something similar to the following image.!</p>
  
  <p><img src="https://i.stack.imgur.com/Fv9n5.jpg" alt="enter image description here"></p>