How can I create JavaScript enhanced web pages?

How can I create JavaScript enhanced web pages?

I’ve been poking around the net and have seen several development environments for creating Java applets/applications. What software do I need to create JavaScripts that I can use on my web pages?

There are currently no development environments for working with JavaScript code. There are no debuggers and no graphical interfaces for writing your scripts.

JavaScript code should be written with a text editor, most likely you’ll choose the same one that you write your HTML in. I prefer to work in WordPad on Windows, and SimpleText or something similar when I’m on a Macintosh. (Yes, that’s right, I’ve yet to see an HTML editor that makes me more productive.) To give you a quick glimspe of how the language could be structered with a text editor, here’s a simple script embedded in an HTML page:

<title>This is a test</title> <SCRIPT LANGUAGE="JavaScript"> <!-- This comment code keeps old browsers from displaying scripts. var myMessage = "Hello!" // Stop hiding this script --> </SCRIPT> This is a test: <SCRIPT LANGUAGE="JavaScript"> document.write(myMessage) </SCRIPT>

You might not be familiar enough with the syntax of JavaScript to understand what’s going on in this example, but you should be able to see how JavaScript appears to be just an extention of HTML. Like HTML, JavaScript relies on the visitor’s browser to parse the code and execute it. You simply write the code as part of your web page and enclose it within tags. There is no compiling, and therefor no ‘bytecode’ or ‘executable’ that needs to be created. These are several reasons why it is so easy to create JavaScripts without the use of a ‘development environment’.


Share the Post: