VirtualMV/JavaScript/Home

From WikiEducator
Jump to: navigation, search




Introduction

Overview

VmvIcon Objectives.png

By the end of this page you will be able to:

  • Describe what JavaScript is.

(This is some stuff I am testing ...gDraw: Interactive Drawing gDraw: Interactive Drawing ) )

What is JavaScript?

  • JavaScript is a scripting language developed by Netscape around 1995 that is somewhat similar in capability to Microsoft’s Visual Basic, Sun’s Tcl, the UNIX-derived Perl, and IBM’s REXX.
  • JavaScript is primarily used in web browsers to add client-side interactivity such as: automatically include today’s date on a Web page, make a linked-to page to appear in a popup window, make text or a graphic image change during a mouse rollover, validate form information and check a user’s computer set-up (e.g. to check whether they have a plug-in installed), plus can add "fun" interactive elements to a web page..
  • In general, scripting languages are easier and faster to code in than the more structured and compiled languages such as C and C++. Script languages generally take longer to process than compiled languages, but are very useful for shorter programs.
  • JavaScript code can be imbedded in HTML pages and interpreted by the Web browser (or client). JavaScript can also be run at the server as in Microsoft’s Active Server Pages (ASPs) before the page is sent to the requestor. Most modern web browsers support JavaScript (including those on some mobile devices), but sometimes in slightly different ways.
  • The web browser provides a host environment for client-side computation including, for instance, objects that represent windows, menus, pop-ups, dialog boxes, text areas, anchors, frames, history, cookies, and input/output.
  • JavaScript statements embedded in an HTML page can respond to user events such as mouse-clicks, form input, and page navigation. For example, you can write a JavaScript function to verify that users enter valid information into a form requesting a telephone number or zip code. Without any network transmission, the HTML page with embedded JavaScript can check the entered data and alert the user with a dialog box if the input is invalid.
  • JavaScript is very different to Sun's Java. Java is a fully fledged programming language (like Microsoft's Visual C# or VisualBasic ), and is designed to be platform independent (runs on Windows, Unix, MocOS).
  • JavaScript is one dialect of ECMAScript (ECMA-262). Others include Adobe ActionScript, and Microsoft's JScript.
  • JavaScript has become very popular as a part of AJAX (asynchronous JavaScript and XML), which gives a Web browser the ability to retrieve data from a Web Server without having to refresh the entire page. Google used this extensively when it introduced Gmail in 2004 and Google maps (2005).

Summary

  • JavaScript is a scripting language
  • A scripting language is a lightweight programming language
  • A JavaScript is lines of executable computer code
  • A JavaScript can be inserted into an HTML page
  • JavaScript is an open scripting language that anyone can use without purchasing a license
  • JavaScript is supported by all major browsers like Internet Explorer, Firefox, Chrome & Safari.

Object Oriented

  • JavaScript is a language that uses object oriented concepts, it is not a true object oriented environment
  • All javascript components are objects (things that do something specific and can be changed)
  • Document object (visible web page) you can modify size, color, text using JavaScript
  • Examples:
document.bgcolor='yellow';
document.write('<h1>Hello world.. JavaScript rulz!</h1>');
Date1=new.date();
<input type="button" name="Submit" value="Submit" onClick="fnCheckOK()" />

Acknowledgements

My thanks to Stephen Corich for the initial content construction

VmvIcon References.png References

virtualMV  |  Superquick wiki guide  |  Please give me some feedback

VirtualMV/JavaScript/Home. (2024). In WikiEducator/VirtualMV wiki. Retrieved November 21, 2024, from http:https://wikieducator.org/VirtualMV/JavaScript/Home    (zotero)