JavaScript What is JavaScript? What can JavaScript do?

Slides:



Advertisements
Similar presentations
JavaScript I. JavaScript is an object oriented programming language used to add interactivity to web pages. Different from Java, even though bears some.
Advertisements

The Web Warrior Guide to Web Design Technologies
1 Javascrbipt Intro Javascript (or js) is a programming language. Interpreted, not compiled. Not the same as java, but, similar. Use tags to use. Object-oriented.
1 Outline 13.1Introduction 13.2A Simple Program: Printing a Line of Text in a Web Page 13.3Another JavaScript Program: Adding Integers 13.4Memory Concepts.
Introduction to Web Site Development Steven Emory Department of Computer Science California State University, Los Angeles Lecture 8: JavaScript I.
Javascript II Expressions and Data Types. 2 JavaScript Review programs executed by the web browser programs embedded in a web page using the script element.
JavaScript, Fourth Edition
Programming Concepts MIT - AITI. Variables l A variable is a name associated with a piece of data l Variables allow you to store and manipulate data in.
Javascript and the Web Whys and Hows of Javascript.
Introduction to JavaScript. JavaScript Facts A scripting language - not compiled but interpreted line by line at run-time. Platform independent. It is.
CS346 - Javascript 1, 21 Module 1 Introduction to JavaScript CS346.
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
Created by, Author Name, School Name—State FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities.
Generations of Programming Languages First generation  Machine Language Second Generation  Assembly Language Third Generation  Procedural language such.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 - JavaScript: Introduction to Scripting Outline 7.1 Introduction 7.2 Simple Program: Printing.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
2440: 211 Interactive Web Programming Expressions & Operators.
Chapter 3: Data Types and Operators JavaScript - Introductory.
Objective Static vs. Dynamic Web pages. Variables. Assignments. JavaScript Hierarchy of Objects JavaScript Functions (prompt(“”,””) Document.write(“”)
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 2: What is JavaScript?
CS346 Javascript -3 Module 3 JavaScript Variables.
JavaScript Syntax, how to use it in a HTML document
JavaScript Scripting language What is Scripting ? A scripting language, script language, or extension language is a programming language.
Introduction to Programming JScript Six Scripting functions Discuss functions Password Example.
ECA 225 Applied Interactive Programming1 ECA 225 Applied Online Programming basics.
 2000 Deitel & Associates, Inc. All rights reserved. Outline 8.1Introduction 8.2A Simple Program: Printing a Line of Text in a Web Page 8.3Another JavaScript.
JavaScript, Fourth Edition
4. Javascript M. Udin Harun Al Rasyid, S.Kom, Ph.D Lab Jaringan Komputer (C-307) Desain.
HTML Overview Part 5 – JavaScript 1. Scripts 2  Scripts are used to add dynamic content to a web page.  Scripts consist of a list of commands that execute.
1) PHP – Personal Home Page Scripting Language 2) JavaScript.
Introduction to JavaScript CSc 2320 Fall 2014 Disclaimer: All words, pictures are adopted from “Simple JavaScript”by Kevin Yank and Cameron Adams and also.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
Javascript Overview. What is Javascript? May be one of the most popular programming languages ever Runs in the browser, not on the server All modern browsers.
JavaScript. JavaScript Introduction JavaScript is the world's most popular programming language. It is the language for HTML and the web, for servers,
Basic Scripting & Variables Yasar Hussain Malik - NISTE.
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
CGS 3066: Web Programming and Design Spring 2016 Introduction to JavaScript.
1 Agenda  Unit 7: Introduction to Programming Using JavaScript T. Jumana Abu Shmais – AOU - Riyadh.
© 2010 Robert K. Moniot1 Chapter 6 Introduction to JavaScript.
PHP using MySQL Database for Web Development (part II)
CGS 3066: Web Programming and Design Spring 2017
>> Introduction to JavaScript
CHAPTER 10 JAVA SCRIPT.
Chapter 6 JavaScript: Introduction to Scripting
“Under the hood”: Angry Birds Maze
Tutorial 10 Programming with JavaScript
Web Development & Design Foundations with HTML5
JavaScript is a programming language designed for Web pages.
Scope, Objects, Strings, Numbers
JavaScript Syntax and Semantics
4. Javascript Pemrograman Web I Program Studi Teknik Informatika
JavaScript.
14 A Brief Look at JavaScript and jQuery.
Chapter 19 JavaScript.
JavaScript an introduction.
JavaScript Selection Statement Creating Array
WEB PROGRAMMING JavaScript.
INFO/CSE 100, Spring 2005 Fluency in Information Technology
PHP.
T. Jumana Abu Shmais – AOU - Riyadh
JavaScript What is JavaScript? What can JavaScript do?
Tutorial 10 Programming with JavaScript
JavaScript CS 4640 Programming Languages for Web Applications
Tutorial 10: Programming with javascript
JavaScript Basics What is JavaScript?
Introducing JavaScript
JavaScript is a scripting language designed for Web pages by Netscape.
CIS 136 Building Mobile Apps
Programming Basics Review
Presentation transcript:

JavaScript What is JavaScript? What can JavaScript do? Three ways to invoke JavaScript Important JavaScript Facts Data types and values Creating Variable Syntax for JavaScript Statements JavaScript Examples

What is JavaScript? JavaScript is a simplest programming language JavaScript is not Java Syntax similar but variable has no data type. JavaScript controls browsers behavior Cannot draw Graphics, & do multithreading

What can JavaScript do? JavaScript can interact by… Putting dynamic text into HTML page Reacting to Events Validate data

Three ways to invoke JavaScript Inline code found between <script> and </script> tag. Inline code is invoked or executed when the browser gets up to the line of code From the Event Handler. In response to a specific things that the user does As a timed event, you can set up a timer that goes off regularly at a predetermined interval and each time a specific code gets executed.

Important JavaScript Facts Java is case sensitive Inside a double quote, you must use a single quote JavaScript has whitespace; it ignores extra spaces Every statement must end with a semicolon

Data Types and Values Numbers-integer, hexadecimal, floating point Strings- number or letters enclosed between quotation Escape sequence (\n, \t, \”) Boolean Values is either true or false

Data Types and Values Function is block of statement which is defined once and can be executed many times Function can have passed argument or parameter Functions can return value or not return value Array object is used to store a list of values

Creating Variable Variable is a name associated with the data value or text; it stores the data. Assignment Statement var variablename = ; Semantics (meaning) Evaluate the expression Copy the result into the variable on the left-hand side of the equal sign value/text/Expression

Syntax for JavaScript Statements objectname.properties = “ ”; Examples: Assign background color for the page document.bgColor = “ ”; Assign information on the status bar window.status = “ ”; Assign a page to load in the window window.location = “ ”;

Syntax for JavaScript Statements variablename = objectname.properties; Examples: Get background color for the page var backgroundC = document.bgColor; Get information on the status bar var current status = window.status; Get current page address var page = window.location;

Syntax for JavaScript Statements objectname.methodname(); variablename=objectname.methodname(); Examples: window.alert(); document.write() var data = window.prompt();