Hello,
There has been something I would like to try, but sadly I'm not that familiar with Javascript - but I know I have to use that.
What I would like to try is to replace words: for example, I don't want people to place the word dog on my forum so I want it to be replaced with cat. They can however still type it in the quick reply option, but I want it to somehow swap the word dog for the word cat in the post that will eventually show up on the forum.
I do know I have to do something like this:
Love & Rockets,
Hert.
There has been something I would like to try, but sadly I'm not that familiar with Javascript - but I know I have to use that.
What I would like to try is to replace words: for example, I don't want people to place the word dog on my forum so I want it to be replaced with cat. They can however still type it in the quick reply option, but I want it to somehow swap the word dog for the word cat in the post that will eventually show up on the forum.
I do know I have to do something like this:
- Code:
function myFunction() {
var str = document.getElementById("demo").innerHTML;
var res = str.replace("dog", "cat");
document.getElementById("demo").innerHTML = res;
}
Love & Rockets,
Hert.