Replacing example
https://stackoverflow.com/questions/72115552/how-can-i-repair-my-html-code-to-convert-letters-to-numbers
by Sasha Rudan
HTML
<!DOCTYPE html>
<html>
<head>
<script>
function replace(){
var text = document.getElementById("textarea").value;
text = text.replace("a", "11");
text = text.replace("b", "12");
text = text.replace("c", "13");
document.getElementById("textarea").value = text;
}
</script>
</head>
<body>
<textarea rows="4" cols="50" id="textarea"></textarea>
<button id="button" onclick="replace();">replace</button>
</body>
</html>