I’m learning JavaScript. However, it’s not so convenient to do some experiments. You have to create a template HTML file and then embed your JavaScript code into it, and then use a browser to open the
HTML file, even you just want to see alert("hello world").
I wonder if it’s easy to create an online JavaScript editor. The basic idea is: in a HTML text-area, you just type in JavaScript code directly, and it has one button, "Run", below to run the JavaScript code.
If it contains some syntax errors, maybe show the error message out. For example: someone already created one like this: http://www.codehouse.com/webmaster_tools/javascript_editor/
How can I create this? Are there any materials, blog, etc. on how to create this?
Consider http://jsbin.com. It’s already equipped with various versions of the most prominent JavaScript frameworks for testing. Furthermore, it stores your code online and creates a short-URL so you can pass examples around, and quickly refer back to previous items of interest. You’ll see many of us here using it frequently to help each other.
If you really want to work on your own, you can fork jsbin on GitHub: http://github.com/remy/jsbin