javascript: toggle plain text to hide it like password text on click of a button
<p>I do not have a <code>&lt;input&gt;</code> or any form. I want some way to toggle a plain text to something like <code>****</code> on click of a button.</p>

<p>for example I have</p>

<pre><code>&lt;p id='one'&gt;google_yahoo&lt;/p&gt;
&lt;button id='two'&gt;toggle&lt;/button&gt;
</code></pre>

<p>so when I click the button once, <code>&lt;p&gt;</code> should become:</p>

<pre><code>&lt;p&gt;************&lt;/p&gt;
</code></pre>

<p>Then when I click the button then I should again get back <code>google_yahoo</code>
<br>But by default I want it be in <code>*****</code> form.</p>

<p>What I did:</p>

<pre><code>&lt;script&gt;
  function myfunction(){
  $("#two").click(function(){
  $("#one").text("abc");
  });
  };
&lt;/script&gt;
</code></pre>

<p><br>Any straightforward, easy to understand solution anyone?</p>