Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page



 

JavaScript

Formerly known as LiveScript and renamed to JavaScript in 1995, JavaScript is an interpreted programming language that allows a web designer the ability to easily insert code into their web page. JavaScript is commonly placed into a HTML, ASP, or a similar type of file and run directly from the web page to perform tasks such as printing the time and date, creating a calendar, or other tasks that are not possible through plain HTML. Below is a basic example of a JavaScript that prints "Hello World!".


<SCRIPT LANGUAGE="JavaScript">
<! -- Hide from old browsers
document.write('Hello World!');
// Stop hide -->
</SCRIPT>

Below is an example of a JavaScript implemented into this page that will print the current time and date. Like all JavaScript files the user must have a browser capable of viewing JavaScript as well as have it enabled. If JavaScript is not enabled you will see a message instead of the date. Finally, a user could also view the source code of this page to get the source code for this script.

Although JavaScript files are often embedded into the HTML file, users can also save their JavaScript code in an external file. This file often ends with a .js file extension

  • To see if JavaScript / Java is installed and what version is detected click here.
  • Additional information about enabling and disabling JavaScript in your browser can be found on document CH000891.
  • Additional examples of useful JavaScripts can be found by clicking here.

Also see: Java, jQuery, JScript, LiveScript, Programming definitions, VBScript

 

Index

Category:
Dictionary

Related Pages:
J - Definitions

 

Resolved

Were you able to locate the answer to your questions?

Home - Computer help - Contact - Dictionary - Links
Link to Computer Hope - Bookmark Computer Hope