Recognizing JavaScript Features

Slides:



Advertisements
Similar presentations
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Advertisements

The Web Warrior Guide to Web Design Technologies
Chapter 7 © 2001 by Addison Wesley Longman, Inc. 1 Chapter 7 Sebesta: Programming the World Wide Web.
LBSC 690 Session #10 Programming, JavaScript Jimmy Lin The iSchool University of Maryland Wednesday, November 5, 2008 This work is licensed under a Creative.
Javascript Document Object Model. How to use JavaScript  JavaScript can be embedded into your html pages in a couple of ways  in elements in both and.
Computer Science 103 Chapter 4 Advanced JavaScript.
JavaScript 101 Lesson 5: Introduction to Events. Lesson Topics Event driven programming Events and event handlers The onClick event handler for hyperlinks.
(CS1301) Introduction to Computer Programming City Univ of HK / Dept of CS / Helena Wong 1. Overview of Programming and JavaScript - 1
Lesson15. JavaScript Objects Objects encapsulate data (properties) and behavior(methods); the properties and the methods of an object are tied together.
CNIT 133 Interactive Web Pags – JavaScript and AJAX Event and Event Handling.
Event Handlers CS101 Introduction to Computing. Learning Goals Learn about event handlers Determine how events are useful in JavaScript Discover where.
IT – som værktøj Bent Thomsen Institut for Datalogi Aalborg Universitet.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
Chapter 3 : Processing on the Front End JavaScript Technically its name is ECMA-262, which refers to the international standard which defines it. The standard.
JavaScript Informatics for economists I. Introduction Programming language used in web pages. Simple and easy to use – written in HTML document. Client.
JavaScript Lecture 6 Rachel A Ober
DHTML: Dynamic HTML Internet Technology1. What is DHTML? A collection of enhancements to HTML ► To create dynamic and interactive websites Combination.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Functions.
Client-Side Scripting JavaScript.  produced by Netscape for use within HTML Web pages.  built into all the major modern browsers. properties  lightweight,
Lecture 10 JavaScript: DOM and Dynamic HTML Boriana Koleva Room: C54
JavaScript Making Web pages come alive. Objectives Be able to read JavaScript scripts Be able to write JavaScript scripts.
Chapter 2: Variables, Functions, Objects, and Events JavaScript - Introductory.
JavaScript Functions A function is a block of code that can be reused. It is similar to a method in Java. It consists of a function name, an argument.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.
JavaScript 101 Introduction to Programming. Topics What is programming? The common elements found in most programming languages Introduction to JavaScript.
USING JAVASCRIPT TO SHOW AN ALERT Web Design Sec 6-2 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
Understanding JavaScript and Coding Essentials Lesson 8.
JavaScript II ECT 270 Robin Burke. Outline Functions Events and event handling Form validation.
Tutorial 11 1 JavaScript Operators and Expressions.
LESSON : EVENTS AND FORM VALIDATION -JAVASCRIPT. EVENTS CLICK.
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
JavaScript and Ajax (JavaScript Environment) Week 6 Web site:
JavaScript 101 Lesson 6: Introduction to Functions.
JavaScript Wrap Up JavaScript is a versatile programming language … if you know it, you can learn others © 2004, Lawrence Snyder.
SE-2840 Dr. Mark L. Hornick 1 Dynamic HTML Handling events from DOM objects.
Tarik Booker CS 120 California State University, Los Angeles.
Build in Objects In JavaScript, almost "everything" is an object.
JavaScript and HTML Simple Event Handling 11-May-18.
Applied Component I Unit II Introduction of java-script
Week 3: Introduction to Javascript
Using JavaScript to Show an Alert
JavaScript is a programming language designed for Web pages.
© 2015, Mike Murach & Associates, Inc.
Nick Sims Scripting Languages.
Barb Ericson Georgia Institute of Technology May 2006
Web Development & Design Foundations with HTML5 7th Edition
JavaScript: Functions
JavaScript Functions.
Javascript Short Introduction By Thanawat Varintree,
JavaScript.
14 A Brief Look at JavaScript and jQuery.
JavaScript and HTML Simple Event Handling 19-Sep-18.
DHTML Javascript Internet Technology.
يمكن استدعاء الكود الوظيفي عند حدث معين أو عند استدعاء الكود الوظيفي .
JavaScript Functions B. Ramamurthy 11/22/2018.
Event Driven Programming & User Defined Functions
A (gentle???) Introduction to JavaScript
Events Comp 205 Fall 2017.
DHTML Javascript Internet Technology.
Functions, Regular expressions and Events
Using Objects Kevin Harville.
JavaScript Overview By Kevin Harville.
JavaScript Basics What is JavaScript?
JavaScript is a scripting language designed for Web pages by Netscape.
JavaScript and Ajax (JavaScript Events)
CNIT 133 Interactive Web Pags – JavaScript and AJAX
Introduction to Web programming
JavaScript and HTML Simple Event Handling 26-Aug-19.
JavaScript and HTML Simple Event Handling 4-Oct-19.
Presentation transcript:

Recognizing JavaScript Features Kevin Harville

Review this slide each week until you know the points completely. The purpose of these slides is to help you recognize the parts of the JavaScript language. Some of the information will need to soak in over time!

Objects Objects are things. Objects have properties. Objects have methods. Methods are things an object does. Example of an object and a property: window.status = “Hello”

Objects Objects are things. Objects have properties. Objects have methods. Methods are things an object does. Example of an object and a method: document.write(“<h1>Hello<h1>”)

Examples of Objects Browser windows HTML documents Forms Form Elements Links We use a hierarchy of objects, known as the Document Object Model.

Other objects JavaScript refers to numerous rather abstract things as objects as well: Dates Strings Arrays of Variables Even Math functionality is handled on an object-oriented basis. This will make more sense as we go on.

Making your own objects Using data in an object-oriented fashion is new, so somewhat intimidating. Once you understand the framework, though, It actually makes programming and data-handling easier. You will even make your own objects!

Making Your Own Objects Suppose you are making a space game. You may make a spaceship object. You can then program using its properties and methods: spaceship.move(4) spaceship.shields = 7

Object summary There are three types of objects we deal with: Built-in Objects: JavaScript objects to provide programming functionality Browser Objects: Document Object Model objects that work with the functionality of your browser. Custom Objects: Objects we make for our own programming purposes.

Variables Variables are names we give to a space on the computer that holds a value. That value may change over time. Lets make some variables: Var myNullValue //not filled; var myVariable = “Hello World”; var myNumber = 24;

Functions Functions are similar to methods. Actually methods are functions. Functions in JavaScript take the role of a function or subroutine in Visual Basic. They may or may not return a value. They perform a particular task or calculation.

Recognizing Functions Calling the function from HTML: onClick = “return sayHello(‘Hi Class’);” And in the script in the head section: Function sayHello(myGreeting){ alert(myGreeting); }

Event Handlers Event Handlers are sections of javascript written into special HTML attributes. <input type = “button” onClick = “return sayHello(‘Hi Class’);” >

Event Examples onClick onLoad onMouseOver onMouseDown onMouseOut Several Others

Parameters Parameters are the values passed into a function or method. return sayHello(‘Hi Class’); return sayHello(myVariable); In VB we referred to parameters as attributes.

Concept Summary Objects Properties Methods Functions Variables Events Parameters