Microsoft PowerPoint - Very quick guide to JavaScript for Java …
Short Description
Very quick guide to JavaScript. for Java programmers. Mark Dunlop. 2/8. Basics. . Often interacts with forms. - Checks forms before submission …
Website: www.cis.strath.ac.uk | Filesize: 105kb
Content
Very quick guide to JavaScript
for Java programmers
Mark Dunlop
2/8
Basics
?Often interacts with forms
- Checks forms before submission
- Automatically completes/calculates fields
?Dynamic typing => no type statements
?Like Java . is used for separating parts of a
variable e.g. object.field
3/8
Example field completion
function init(form) {
// puts the date (in non-US format into the date field of form
date = new Date();
form.date.value=date.getDate()+”/”+
(date.getMonth()+1)+”/”+date.getFullYear();
}
?to call add info to body tag of HTML page and to form tag
…