Welcome aboard! We are happy you are here and wish you good net-raft!
<!doctype html>
<html lang="en">
<head>
<script type="text/javascript">
function convert_string(str) {
str = str.replace(/[&\/\\#,'+()$=~%!.'":*?<>{}]/g, '');
return str;
}
function convert() {
var class1 = document.getElementById("div1");
class1.innerText = convert_string('hello #,'+()$=~%!.\'":*?<world!');
}
</script>
</head>
<body>
<button onclick="convert()">click</button>
<hr>
<div>Result:</div>
<hr>
<div id="div1"></div>
</body>
</html>
The most helpful JAVASCRIPT solutions
How can I get the last day and the next day in javascript ?JAVASCRIPT Click to see more ... 5.8K 507