/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function replaceAll(string, token, newtoken) { while (string.indexOf(token) != -1) { string = string.replace(token, newtoken); } return string; }