JavaScript
Article

jQuery replace all characters with asterisks

By Sam Deering

Use JavaScript to replace all characters with asterisks.

//iVal is your string of characters (with asterisks).
iVal = iVal.substr(i).replace(/[S]/g, "*");
  • Hasanozen

    thank you

Recommended
Sponsors
Get the latest in JavaScript, once a week, for free.