Javascript
Javascript
The BROWSER scripting language.
Similar syntax to java.
History: Netscape created to allow dynamic web pages.
Uses: Many, here are a couple:
verifying and reacting to user input,
updating page without making user wait
Javascript tutorial:
Alert box sample:
function disp_confirm()
{
var r=confirm("Press a button");
if (r==true)
{
document.write("You pressed OK!");
}
else
{
document.write("You pressed Cancel!");
}
}
Can also put javascript in a file external to the html:
confirm.js:
function disp_confirm()
{
var r=confirm("Press a button");
if (r==true)
{
document.write("You pressed OK!");
}
else
{
document.write("You pressed Cancel!");
}
}
See sample at
Advanced Uses
DOM – Document Object Model
Your program can get at the elements in the html.
So, for instance, you can sort a list in different ways.
A big data structure representing the html page.
AJAX – Asynchronous javascript and xml
Call a server to get data, asynchronously.
User doesn’t have to wait for call to web service to complete
Vacation fun: Write mastermind with html and javascript!
-----------------------
Html page
Java script
External Web service
Server
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- javascript invert array
- javascript array syntax
- javascript array to string
- javascript array update existing element
- javascript array functions
- javascript convert array to string
- javascript change array element
- javascript array variable
- javascript parse string to date
- javascript function array argument
- javascript update item in array
- javascript array of objects example