show only last 4 digits in bank account using javascript
<p>I need help with Javascript. I need to replace however many characters there are previous to the last 4 digits of a text field that contains bank account number. I have searched through the net on this, but cannot find one code that works. I did find a code here on stackoverflow, which was regarding credit card, </p>

<pre><code>new String('x', creditCard.Length - 4) + creditCard.Substring(creditCard.Length - 4);
</code></pre>

<p>I just replaced the creditCard with accounNumObject:</p>

<pre><code>var accounNumObject = document.getElementById("bankAcctNum")
</code></pre>

<p>The input is pretty simple.</p>

<pre><code>&lt;cfinput type="text" name="bankAcctNum" id="bankAcctNum" maxlength="25" size="25" value="#value#" onblur="hideAccountNum();"&gt;
</code></pre>

<p>Can anyone help please?</p>
