This question is quite different with How do I use the Enter key as an event handler (javascript)? or Enter key press event in JavaScript
I just want to use a Javascript function to replace Enter Key Event.
For example.Now I am typing this string into a textarea
"Hello world Hello world Hello world"
As you can see there are three "Hello world" in this string.
If I want to make this string to this effect
"Hello world
Hello world
Hello world"
I shoud press the "Enter Key" after every "Hello world".
Now this question is how to use javascript to replace the Enter Key Event?It means the user doesn't need to press the Enter key and the scripts would do it automatically.
And also I hope that the scripts would cross different Browsers.