Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Dynamic Content
Expertise: Beginner
Mar 19, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

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:

<HTML> <HEAD> <meta name="WT.qs_dlk" content="XBYNdMliJDp34Cf5BP-zSQAAABY"/> <meta name="WT.qs_shmv" content="hv20180802-chiron.sf.quinstreet.net"/> <meta name="inject_params" content="WT.qs_dlk=XBYNdMliJDp34Cf5BP-zSQAAABY&"/> <script>!function(){if(!window.BOOMR||!window.BOOMR.version){var e,t,n,o=document.createElement("iframe");o.src="javascript:false",o.title="",o.role="presentation",(o.frameElement||o).style.cssText="width:0;height:0;border:0;display:none;",(n=document.getElementsByTagName("script")[0]).parentNode.insertBefore(o,n);try{t=o.contentWindow.document}catch(n){e=document.domain,o.src="javascript:var d=document.open();d.domain='"+e+"';void(0);",t=o.contentWindow.document}t.open()._l=function(){var t=this.createElement("script");e&&(this.domain=e),t.id="boomr-if-as",t.src="/imageserver/common/sg/1.0/sg.min.js",BOOMR_lstart=(new Date).getTime(),this.body.appendChild(t)},t.write('<body onload="document._l();">'),t.close()}}();</script> <script> document.cookie = 'inject_params=WT.qs_dlk=XBYNdMliJDp34Cf5BP-zSQAAABY&; path=/; domain=devx.com;'; document.cookie = 'WMUUID=XBYNdMliJDp34Cf5BP-zSQAAABY; path=/; domain=devx.com;'; </script> <TITLE>This is a test</title> <SCRIPT LANGUAGE=&quot;JavaScript&quot;> <!-- This comment code keeps old browsers from displaying scripts. var myMessage = &quot;Hello!&quot; // Stop hiding this script --> </script> <script> window.webtrendsAsyncInit=function(){ var dcs=new Webtrends.dcs().init({ dcsid:"dcsetaek200000gcgxfcx07g4_2p3u", domain:"www.qsstats.com", timezone:-8, i18n:true, onsitedoms:"devx.com", fpcdom:".devx.com", plugins:{ //hm:{src:"//s.webtrends.com/js/webtrends.hm.js"} } }).track(); }; (function(){ var s=document.createElement("script"); s.async=true; s.src="/imageserver/common/v10/webtrends.min.js"; var s2=document.getElementsByTagName("script")[0]; s2.parentNode.insertBefore(s,s2); }()); </script> <noscript><img alt="dcsimg" id="dcsimg" width="1" height="1" src="//www.qsstats.com/dcsetaek200000gcgxfcx07g4_2p3u/njs.gif?dcsuri=/index.php/tips/Tip/23182&amp;WT.js=No&amp;WT.tv=10.4.1&amp;dcssip=www.devx.com&amp;WT.qs_dlk=XBYNdMliJDp34Cf5BP-zSQAAABY&"/></noscript> </head> <BODY> This is a test: <SCRIPT LANGUAGE=&quot;JavaScript&quot;> document.write(myMessage) </script> </body> </html>

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'.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date