JavaScript
Article
By Sam Deering

jQuery replace all characters with asterisks

By Sam Deering

Use JavaScript to replace all characters with asterisks.

--ADVERTISEMENT--

//iVal is your string of characters (with asterisks).
iVal = iVal.substr(i).replace(/[S]/g, "*");
Login or Create Account to Comment
Login Create Account
Recommended
Sponsors
Get the most important and interesting stories in tech. Straight to your inbox, daily.