Javascript - USF Computer Science
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
- igcse computer science workbooks pdf
- igcse computer science workbook
- igcse computer science workbook answer
- igcse computer science coursebook pdf
- computer science people
- what is computer science like
- computer science revision
- igcse computer science revision notes
- college computer science project ideas
- ideas for computer science project
- computer science projects for students
- computer science final project