JavaScript. Why JavaScript? Dynamic Form Validation. Online calculator. IT Engineering I Instructor: Ali B. Hashemi. Interaction

Size: px
Start display at page:

Download "JavaScript. Why JavaScript? Dynamic Form Validation. Online calculator. IT Engineering I Instructor: Ali B. Hashemi. Interaction"

Transcription

1 JavaScript Why JavaScript? HTML s role on the Web Purpose tell the browser how a document should appear Static fixed view (no interaction) IT Engineering I Instructor: Ali B. Hashemi JavaScript s role on the Web Purpose make web pages more dynamic and interactive Change contents of document, provide forms and controls, animation, control web browser window, etc. ١ ٢ Online calculator Dynamic Form Validation Interaction So Scripting ٣ ۴ ١

2 Registration form Overview What is needed? Originally called LiveScript when introduced in Netscape Navigator In Navigator 2.0, name changed to JavaScript Current version 1.5 JScript MS version of JavaScript Current version 5.5 Two formats: Client-side Program runs on client (browser) Server-side Program runs on server Proprietary to web server platform ۵ ۶ Overview (cont.) JavaScript's abilities A "scripting" language for HTML pages Embed code in HTML The browser interprets and executes the script Not compiled NO data types for variables For security cannot write to client s disk Generating HTML content dynamically Customize pages to suit users Monitoring and responding to user events Validate forms before submission Interact with the frames and windows of the browser manipulate "browser objects": HTML form elements, Images, Frames, etc. Manipulate HTTP cookies (to be discussed in PHP section) ٧ ٨ ٢

3 JavaScript is not Java Java : compilation required (not a script) can create "stand alone" application Why is it called Javascript then? purely a marketing trick JavaScript was originally called LiveScript changed to JavaScript at the last minute ٩ Java (platform independent) You Java Source Code Byte Code Placed on Web Server for Download Java Byte Code Your Computer Java Compiler (Mac) Java Compiler (PC) Java Compiler (Unix) Java Byte Code Web Server Java Interpreter (Mac) Java Interpreter (Unix) Java Interpreter (PC) Client Using Web Browser ١٠ Web Architecture for JavaScript "CLIENT" Desktop access Web browser HTML Page: <SCRIPT> code.. </SCRIPT> built-in JavaScript interpreter HTML/HTTP TCP/IP Internet HTML/HTTP TCP/IP "SERVER" Remote host Web (HTTP) Server HTML pages w/ embedded script ١١ JavaScript Versions JavaScript 1.0 The original version of the language. It was buggy and is now essentially obsolete. Implemented by Netscape 2. JavaScript 1.1 Introduced a true Array object; most serious bugs resolved. Implemented by Netscape 3. JavaScript 1.2 Introduced the switch statement, regular expressions, and a number of other features. Almost compliant with ECMA v1, but has some incompatibilities. Implemented by Netscape 4. JavaScript 1.3 Fixed incompatibilities of JavaScript 1.2. Compliant with ECMA v1. Implemented by Netscape 4.5. JavaScript 1.4 Implemented only in Netscape server products. JavaScript 1.5 Introduced exception handling. Compliant with ECMA v3. Implemented by Mozilla and Netscape 6. ١٢ ٣

4 Where Should I Write Javascript JavaScript programs are within an HTML document Use the <script> Tag <script> Javascript Code </script> Used to notify the browser that JavaScript statements are contained within A First JavaScript Program <script language="***"> language attribute Denotes the scripting language being used Default JavaScript Other languages (e.g., VBScript) Also can specify script language version No space between name and version Checked by browser, scripts ignored if browser doesn t support version ١٣ ١۴ A First JavaScript Program JavaScript: Hello world Object-based language Object Programming code and data that can be treated as an individual unit or component Statements Individual lines in a programming language Methods Groups of statements related to a particular object ١۵ ١٧ ۴

5 Write JavaScript code for this page Comments in JavaScript Two types Line comments // ignore all text to the end of the line Block comments /* ignore all text between these symbols */ ١٨ ١٩ Comments in JavaScript (example) Remember HTML comments ٢٠ ٢١ ۵

6 Hiding JavaScript from Incompatible Browsers What happens if JavaScript is turned off in a browser? Two methods 1. Place JavaScript in external source file 2. Enclose the code within HTML comments <script language="javascript"> <!- script statements go here //-- --> </script> The start of the HTML comment (<!--) is straightforward. But because the end-comment tag (-->) causes a syntax error in scriptable browsers: a JavaScript comment symbol (//) must precede the endcomment tag. When There Is No JavaScript How to specify content that should appear only if JavaScript wasn t available Use <noscript> & </noscript> to place alternate message to users of old browsers OR users with disabled javascript ٢٢ ٢٣ When There Is No JavaScript (example) JavaScript keywords //STOP HIDING FROM INCOMPATIBLE BROWSERS--> Only in browser with disabled Javascript ٢۴ ٢۵ ۶

7 JavaScript keywords (cont.) Variables Syntax rules Cannot use: Reserved words (keywords) & spaces Must begin with one of the following: Uppercase or lowercase ASCII letter (a-z, A-Z) Dollar sign ($) or underscore (_) Can use numbers, but not as first character Variables are case-sensitive sensitive ٢۶ ٢٧ Variables Conventions Illegal variable names Use underscore or capitalization to separate words of an identifier employee_first_name employeefirstname My_variable $my_variable _my_variable ٢٨ ٢٩ ٧

8 Working with Variables Variable Scope 3 ways To define a variable and assign a value to it: Use keyword var to declare the variable Use the assignment operator to assign the variable a value var employeename; 1 employeename = "Ali"; 2 var employeename = "Ali"; 3 employeename = "Hassan"; Once created: May be changed at any point in the program Values stored in memory Value can vary over time Defines where in the program a declared variable can be used 1. Global variable Any variable defined outside of a function is part of the global variable scope. var keyword optional 2. Local variable Declared inside a function and is only available within the function it is declared Global and local variables can use same identifiers ٣٠ ٣١ Operators (I) Arithmetic operators (all numbers are floating-point): + - * / % Comparison operators: < <= ==!= >= > Logical operators: &&! (&& and are short-circuit operators) Bitwise operators: & ^ ~ << >> >>> Assignment operators: += -= *= /= %= <<= >>= >>>= &= ^= = Operators (II) String operator: + var longstring = "One piece "+"plus" "plus one more piece."; The conditional operator: condition? value_if_true : value_if_false (a>10)? state="old": state="young" If (age>70){ state="old"; else { state="young"; ٣٢ ٣٣ ٨

9 Equality Operator == var stringa = "I am "; var stringb = new String("an intelligent person"); Different Type! The first is a string value, The second is an instance of a String object. If you place these two values on either side of an equality (==) operator, JavaScript tries various evaluations of the values to see if there is a coincidence somewhere. stringa == stringb returns true. == and!= If the types of the two expressions are different, attempt to convert them to string, number, or Boolean. ٣۴ Strict Equality Operator === The strict equality operator (===), performs no data type conversions. The types must be the same to be considered equal. The following expression evaluates to false because the two object types differ, even though their payloads are the same: var stringa = "I am "; var stringb = new String("an intelligent person"); stringa === stringb returns false. ٣۵ Objects An object is a collection of named values. properties of the object. fields of the object if an object named image has properties named width and height, we can refer to those properties like this: image.width image.height Object Methods document.write write("this is a test"); Object literals or object initializer Object Literals Allows you to create an object and specify its properties Consists of a comma-separated list of colon-separated property/value pairs, all enclosed within curly braces. : { name1 : value1,..., namen : valuen car={mycar:"samand",getcar:cartypes("honda"),special:sales The fields are mycar, getcar, and special "Samand" and "Mazda" are Strings CarTypes is a function call with parameter Honda Sales is a variable you defined earlier Example: document.write("i own a " + car.mycar); ٣۶ ٣٧ ٩

10 Three ways to create an object 1. You can use an object literal: var course = { number: "IT402", teacher: "Mr. Ali" 2. You can use new to create a "blank" object, and add fields to it later: var course = new Object(); course.number = "IT402"; course.teacher = "Mr. Ali"; 3. You can write and use a constructor: function Course(n, t) { // best placed in <head> this.number = n; // keyword "this" is required, not optional this.teacher = t; var course = new Course("IT402", "Mr. Ali"); Array literals color = ["red", "yellow", "green", "blue"]; Arrays are zero-based: color[0] is "red" two commas in a row: "empty" element in that location Example: color = ["red",,, "green", "blue"]; color has 5 elements However, a single comma at the end is ignored Example: color=["red",,, "green","blue",]; still has 5 elements ٣٨ ٣٩ Four ways to create an array The length of an array 1. You can use an array literal: var colors = ["red", "green", "blue"]; 2. You can use new Array() to create an empty array: var colors = new Array(); You can add elements to the array later: colors[0] = "red"; colors[2] = "blue"; colors[1]="green"; 3. You can use new Array(n) with a single numeric argument to create an array of that size var colors = new Array(3); 4. You can use new Array( ) with two or more arguments to create an array containing those values: var colors = new Array("red","green", "blue"); If myarray is an array, its length is given by myarray.length Array length can be changed by assignment beyond the current length var a = new Array( ); // a.length == 0 (no elements defined) a = new Array(10); // a.length == 10 (empty elements 0-9 defined) a = new Array(1,2,3); // a.length == 3 (elements 0-2 defined) a = [4, 5]; // a.length == 2 (elements 0 and 1 defined) a[5] = -1; // a.length == 6 (elements 0, 1, and 5 defined) a[49] = 0; // a.length == 50 (elements 0, 1, 5, and 49 defined) Arrays are sparse: space is only allocated for elements that have been assigned a value Example: myarray[50000] = 3; is perfectly OK But indices must be between 0 and Multidimensional Arrays Just array of arrays: var a = [ ["red", 255], ["green", 128] ]; var b = a[1][0]; // b is now "green" ۴٠ ۴١ ١٠

11 Arrays and objects Array functions Arrays are objects car = { mycar: "Samand", 7: "Mazda" car[7] is the same as car.7 car.mycar is the same as car["mycar"] If you know the name of a property, you can use dot notation: car.mycar If you don t know the name of a property, but you have it in a variable (or can compute it), you must use array notation: car["my" + "Car"] If myarray is an array, myarray.sort() sorts the array alphabetically myarray.sort(function(a, b) { return a - b; ) sorts numerically // Returns < 0, 0, or > 0, depending on order myarray.reverse() reverses the array elements ۴٢ ۴٣ Array functions (cont.) The for in statement myarray.push( ) adds any number of new elements to the end of the array, and increases the array s length myarray.pop() removes and returns the last element of the array, and decrements the array s length myarray.unshift() and myarray.shift() myarray.tostring() returns a string containing the values of the array elements, separated by commas Array.join( ) method converts all the elements of an array to strings and concatenates them. loop through all the properties of an object with for (variable in object) statement; for (var prop in course) { document.write(prop + ": " + course[prop]); course["teacher"] is equivalent to course.teacher You must use brackets if the property name is in a variable Possible output: teacher: Mr. Ali number: IT402 The properties are accessed in an undefined order If you add or delete properties of the object within the loop, it is undefined whether the loop will visit those properties Arrays are objects; applied to an array, for in will visit the "properties" 0, 1, 2, ۴۴ ۴۵ ١١

12 The with statement document.myform.result.value = compute(document.myform.myinput.value); a lot of typing! With (object)( statement; ; uses the object as the default prefix for variables in the statement with (document.myform) { result.value = compute(myinput.value); Decision Making if statements if else statements Nested if statements switch statements ۴۶ ۴٧ if Statements if Statements if (conditional_expression) { statement(s); ۴٨ ۴٩ ١٢

13 if else Statements if (conditional_expression) { statement(s); else { statement(s); ۵٠ ۵١ switch Statements switch (expression) { case label1: statement(s); break; case label2: statement(s); break; default: statement(s); ۵٢ ۵٣ ١٣

14 Decision Making switch Statements Case labels Identify specific code segments Can use a variety of data types as case labels Break statement Used to exit switch statements Default label Contains statements that execute when the condition expression doesn t match any of the case labels ۵۴ ۵۵ Repetition while statements do while statements for statements for in statements with statements continue statements ۵۶ ۵٧ ١۴

15 while Statements while (conditional_expression) { statement(s); var count = 1; while (count <= 5) { document.writeln(count); ++count; document.writeln("you have printed 5 numbers."); while Statements var count = 10; while (count > 0) { document.writeln(count); --count; document.writeln("we have liftoff."); ۵٨ ۵٩ do while Statements do { statement(s); while (conditional_expression); for Statements for (initialization_expression; condition; update_statement) { statement(s); ۶٠ ۶١ ١۵

16 for in Statements A looping statement that executes the same statement or command block for all the properties within an object Enables enumeration through an object s properties Syntax for (variable in object) { statement(s); ۶٢ ۶٣ with Statements Eliminates the need to retype the name of an object when properties of the same object are being referenced in a series Syntax with (object) { statement(s); ۶۴ ۶۵ ١۶

17 break,continue Statements Breaks the loop Halts a looping statement and restarts the loop with a new iteration ۶۶ ۶٧ Some string methods is addr charat(n) Returns the nth character of a string concat(string1,..., stringn) Concatenates the string arguments to the recipient string indexof(substring) Returns the position of the first character of substring in the recipient string, or -1 if not found indexof(substring, start) Returns the position of the first character of substring in the given string that begins at or after position start, or -1 if not found lastindexof(substring), lastindexof(substring, start) Like indexof, but searching starts from the end of the recipient string // validates that the entry is formatted as an address function is addr(elem) { var str = elem.value; str = str.tolowercase( ); if (str.indexof("@") > 1) { var addr = str.substring(0, str.indexof("@")); var domain = str.substring(str.indexof("@") + 1, str.length); // at least one top level domain required if (domain.indexof(".") == -1) { alert("verify the domain portion of the address."); return false; ۶٨ ۶٩ ١٧

18 is addr(cont.) is addr(cont.) // parse address portion first, character by character for (var i = 0; i < addr.length; i++) { onechar = addr.charat(i).charcodeat(0); // dot or hyphen not allowed in first position; dot in last if ((i == 0 && (onechar == 45 onechar == 46)) (i == addr.length - 1 && onechar == 46)) { alert("verify the user name portion of the address."); return false; // acceptable characters (-. _ 0-9 a-z) if (onechar == 45 onechar == 46 onechar == 95 (onechar > 47 && onechar < 58) (onechar > 96 && onechar < 123)) { continue; else { alert("verify the user name portion of the address."); return false; for (i = 0; i < domain.length; i++) { onechar = domain.charat(i).charcodeat(0); if ((i == 0 && (onechar == 45 onechar == 46)) ((i == domain.length - 1 i == domain.length - 2) && onechar == 46)) { alert("verify the domain portion of the address."); return false; if (onechar == 45 onechar == 46 onechar == 95 (onechar > 47 && onechar < 58) (onechar > 96 && onechar < 123)) { continue; else { alert("verify the domain portion of the address."); return false; return true; // end of if (str.indexof("@") > 1) alert("the address may not be formatted correctly. Please verify."); return false; ٧٠ ٧١ is addrregexp (validating syntax with regular expressions) How does it work? (validating syntax with regular expressions) // validates that the entry is formatted as an address function is addrregexp( ) { var str = .value; var re = /^[\w-]+( ]+(\.[\w-]+)*@([\w-]+\.)+[a-za-z]{2,7$/ Z]{2,7$/; if (!str.match(re)) { alert("verify the address format."); return false; else { return true; ٧٢ looks for a match that begins ^ with one or more letters, numerals, underscores, or hyphens [\w-] followed by zero or more combinations of a period, letter, numeral, underscore, or hyphen ((\.[.[\w-]+)*) followed by sign followed by one or more computer or domains (([\w-]+ ]+\.)+) followed by two to seven upper- or lowercase letters for the top-level domain name ([a-za za-z]{2,7) on the tail end ($). ٧٣ ١٨

19 Regular expressions More string methods Two way: 1. Within slashes: re = /ab+c/ 2. With a constructor: re = new RegExp("ab+c") Regular expressions are almost the same as in Perl or Java (only a few unusual features are missing) var shortstr = "ali"; Var longstr= "alien from mars"; var myfirstregexp = new RegExp(shortStr, "g"); var result = longstr.match(myfirstregexp); if (result) { alert("found " + result.length + " instances of the text: " + result[0]); else { alert("sorry, no matches."); ٧۴ match(regexp regexp) Returns an array containing the results, or null if no match is found On a successful match: If g (global) is set, the array contains the matched substrings If g is not set: Array location 0 contains the matched text Locations 1... contain text matched by parenthesized groups The array index property gives the first matched position replace(regexp,, replacement) Returns a new string that has the matched substring replaced with the replacement search(regexp) Returns the position of the first matched substring in the given string, or -1 if not found. ٧۵ Defining Custom Functions Custom Function example Function: Individual statements grouped together to form a specific procedure Allows you to treat the group of statements as a single unit Must be contained between <script> and </script> tags A function definition consists of three parts: Reserved word function followed by the function name (identifier) Parameters required by the function, contained within parentheses following the name Parameters variables used within the function Zero or more may be used Function statements, delimited by curly braces { function myfunctionname(param1, param2, ) { // statements go here ٧۶ ٧٧ ١٩

20 Returning a value from a Function Function call A function can return nothing Just performing some task A function can return a value Perform a calculation and return the result Var returnvalue = functioncall(param1, param2); A return statement must be added to function definition function daypart( ) { var onedate = new Date( ); var thehour = onedate.gethours( ); if (thehour < 12) { return "morning"; else if (thehour < 18) { return "afternoon"; else { return "evening"; <script language="javascript" type="text/javascript"> <!-- document.write("good " + daypart( ) + " and welcome") //--> </script> Function invocation or call Statement including function name followed by a list of arguments in parentheses Parameter of function definition takes on value of argument passed to function in function call Code placement Functions must be created (defined) before called <head> rendered by browser before <body> Function definition Place in <head> section Function call Place in <body> section ٧٨ ٧٩ Placing JavaScript in <head> or <body> sections? Script statements interpreted in order of document rendering <head> section rendered before <body> section Good practice to place as much code as possible in <head> section Built-in JavaScript Functions Functions defined as part of the JavaScript language Function call identical to the custom functions ٨٠ ٨١ ٢٠

21 Built-in JavaScript Functions (cont.) Built-in JavaScript utility methods alert() method Displays a pop-up dialog box with an OK button javascript:alert("this is the result of an alert"); ٨٢ ٨٣ prompt() method Displays a pop-up dialog box with a message, a text box, an OK button, and a Cancel button javascript:prompt("this is the result of an Prompt","default value in text box``` Reusing Javascript code Write a javascript function, use it in many html file! HOW? 1. Create a new file with the extension.js. 2. Put your JavaScript code in this file; NO opening and closing SCRIPT tags in the file! 3. To embed into your Web page, use these tags in your HTML file: <SCRIPT LANGUAGE="JavaScript" SRC="myscript.js"> </SCRIPT> Makes HTML document neater (less confusing) JavaScript can be shared among multiple HTML files ٨۴ ٨۵ ٢١

22 JavaScript Source File (cont.) JavaScript source files Use src attribute of <script src = "*.js"> Browser will ignore any JavaScript statements inside <script> and </script> if src attribute is used Cannot include HTML tags in source file JavaScript: Source File & embedded Can use a combination of embedded and non embedded code Finer granularity in coding functionality <script language="javascript" src="../ ="../source.js"> </script> ٨۶ ٨٧ Example of JavaScript: Source File & embedded ٨٨ ٢٢

JavaScript. IT Engineering I Instructor: Ali B. Hashemi

JavaScript. IT Engineering I Instructor: Ali B. Hashemi JavaScript IT Engineering I Instructor: Ali B. Hashemi ١ ١ Why JavaScript? HTML s role on the Web Purpose tell the browser how a document should appear Static fixed view (no interaction) JavaScript s role

More information

JavaScript. IT Engineering I Instructor: Ali B. Hashemi

JavaScript. IT Engineering I Instructor: Ali B. Hashemi JavaScript IT Engineering I Instructor: Ali B. Hashemi 1 1 Why JavaScript? HTML s role on the Web Purpose tell the browser how a document should appear Static fixed view (no interaction) JavaScript s role

More information

JavaScript. Why JavaScript? Registration form. Online calculator. IT Engineering I Instructor: Ali B. Hashemi. Interaction

JavaScript. Why JavaScript? Registration form. Online calculator. IT Engineering I Instructor: Ali B. Hashemi. Interaction JavaScript Why JavaScript? HTML role on the Web Purpose tell the browser how a document should appear Static can view or print (no interaction) IT Engineering I Instructor: Ali B. Hashemi JavaScript s

More information

CSC Web Programming. Introduction to JavaScript

CSC Web Programming. Introduction to JavaScript CSC 242 - Web Programming Introduction to JavaScript JavaScript JavaScript is a client-side scripting language the code is executed by the web browser JavaScript is an embedded language it relies on its

More information

5/19/2015. Objectives. JavaScript, Sixth Edition. Introduction to the World Wide Web (cont d.) Introduction to the World Wide Web

5/19/2015. Objectives. JavaScript, Sixth Edition. Introduction to the World Wide Web (cont d.) Introduction to the World Wide Web Objectives JavaScript, Sixth Edition Chapter 1 Introduction to JavaScript When you complete this chapter, you will be able to: Explain the history of the World Wide Web Describe the difference between

More information

Working with JavaScript

Working with JavaScript Working with JavaScript Creating a Programmable Web Page for North Pole Novelties 1 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page 2 Objectives

More information

JavaScript CS 4640 Programming Languages for Web Applications

JavaScript CS 4640 Programming Languages for Web Applications JavaScript CS 4640 Programming Languages for Web Applications 1 How HTML, CSS, and JS Fit Together {css} javascript() Content layer The HTML gives the page structure and adds semantics Presentation

More information

JavaScript Functions, Objects and Array

JavaScript Functions, Objects and Array JavaScript Functions, Objects and Array Defining a Function A definition starts with the word function. A name follows that must start with a letter or underscore, followed by any number of letters, digits,

More information

JavaScript CS 4640 Programming Languages for Web Applications

JavaScript CS 4640 Programming Languages for Web Applications JavaScript CS 4640 Programming Languages for Web Applications 1 How HTML, CSS, and JS Fit Together {css} javascript() Content layer The HTML gives the page structure and adds semantics Presentation

More information

Regular Expressions. Regular expressions are a powerful search-and-replace technique that is widely used in other environments (such as Unix and Perl)

Regular Expressions. Regular expressions are a powerful search-and-replace technique that is widely used in other environments (such as Unix and Perl) Regular Expressions Regular expressions are a powerful search-and-replace technique that is widely used in other environments (such as Unix and Perl) JavaScript started supporting regular expressions in

More information

Client-Side Web Technologies. JavaScript Part I

Client-Side Web Technologies. JavaScript Part I Client-Side Web Technologies JavaScript Part I JavaScript First appeared in 1996 in Netscape Navigator Main purpose was to handle input validation that was currently being done server-side Now a powerful

More information

JavaScript: Introduction, Types

JavaScript: Introduction, Types JavaScript: Introduction, Types Computer Science and Engineering College of Engineering The Ohio State University Lecture 19 History Developed by Netscape "LiveScript", then renamed "JavaScript" Nothing

More information

CGS 3066: Spring 2015 JavaScript Reference

CGS 3066: Spring 2015 JavaScript Reference CGS 3066: Spring 2015 JavaScript Reference Can also be used as a study guide. Only covers topics discussed in class. 1 Introduction JavaScript is a scripting language produced by Netscape for use within

More information

JavaScript. History. Adding JavaScript to a page. CS144: Web Applications

JavaScript. History. Adding JavaScript to a page. CS144: Web Applications JavaScript Started as a simple script in a Web page that is interpreted and run by the browser Supported by most modern browsers Allows dynamic update of a web page More generally, allows running an arbitrary

More information

Chapter 2 Working with Data Types and Operators

Chapter 2 Working with Data Types and Operators JavaScript, Fourth Edition 2-1 Chapter 2 Working with Data Types and Operators At a Glance Instructor s Manual Table of Contents Overview Objectives Teaching Tips Quick Quizzes Class Discussion Topics

More information

COMS 469: Interactive Media II

COMS 469: Interactive Media II COMS 469: Interactive Media II Agenda Review Data Types & Variables Decisions, Loops, and Functions Review gunkelweb.com/coms469 Review Basic Terminology Computer Languages Interpreted vs. Compiled Client

More information

JavaScript. History. Adding JavaScript to a page. CS144: Web Applications

JavaScript. History. Adding JavaScript to a page. CS144: Web Applications JavaScript Started as a simple script in a Web page that is interpreted and run by the browser Supported by most modern browsers Allows dynamic update of a web page More generally, allows running an arbitrary

More information

COMS 469: Interactive Media II

COMS 469: Interactive Media II COMS 469: Interactive Media II Agenda Class Roster Course Web Site & Syllabus JavaScript Introduction (ch. 1) gunkelweb.com/coms469 Introduction to JavaScript Chapter One Introduction to JavaScript and

More information

Javascript. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010

Javascript. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010 Lecture 15 Javascript Announcements Project #1 Graded VG, G= doing well, OK = did the minimum, OK - = some issues, do better on P#2 Homework #6 posted, due 11/5 Get JavaScript by Example Most examples

More information

PHP by Pearson Education, Inc. All Rights Reserved.

PHP by Pearson Education, Inc. All Rights Reserved. PHP 1992-2012 by Pearson Education, Inc. All Client-side Languages User-agent (web browser) requests a web page JavaScript is executed on PC http request Can affect the Browser and the page itself http

More information

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh Web Programming and Design MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh Plan for the next 5 weeks: Introduction to HTML tags, creating our template file Introduction to CSS and style

More information

JAVASCRIPT. sarojpandey.com.np/iroz. JavaScript

JAVASCRIPT. sarojpandey.com.np/iroz. JavaScript JAVASCRIPT 1 Introduction JAVASCRIPT is a compact, object-based scripting language for developing client Internet applications. was designed to add interactivity to HTML pages. is a scripting language

More information

3 The Building Blocks: Data Types, Literals, and Variables

3 The Building Blocks: Data Types, Literals, and Variables chapter 3 The Building Blocks: Data Types, Literals, and Variables 3.1 Data Types A program can do many things, including calculations, sorting names, preparing phone lists, displaying images, validating

More information

(Refer Slide Time: 01:40)

(Refer Slide Time: 01:40) Internet Technology Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture No #25 Javascript Part I Today will be talking about a language

More information

Chapter 2: Functions and Control Structures

Chapter 2: Functions and Control Structures Chapter 2: Functions and Control Structures TRUE/FALSE 1. A function definition contains the lines of code that make up a function. T PTS: 1 REF: 75 2. Functions are placed within parentheses that follow

More information

Full file at

Full file at Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class

More information

Chapter 3 - Simple JavaScript - Programming Basics. Lesson 1 - JavaScript: What is it and what does it look like?

Chapter 3 - Simple JavaScript - Programming Basics. Lesson 1 - JavaScript: What is it and what does it look like? Chapter 3 - Simple JavaScript - Programming Basics Lesson 1 - JavaScript: What is it and what does it look like? PP presentation JavaScript.ppt. Lab 3.1. Lesson 2 - JavaScript Comments, document.write(),

More information

Java How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved.

Java How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved. Java How to Program, 10/e Education, Inc. All Rights Reserved. Each class you create becomes a new type that can be used to declare variables and create objects. You can declare new classes as needed;

More information

JScript Reference. Contents

JScript Reference. Contents JScript Reference Contents Exploring the JScript Language JScript Example Altium Designer and Borland Delphi Run Time Libraries Server Processes JScript Source Files PRJSCR, JS and DFM files About JScript

More information

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017)

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017) COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017) RAMANA ISUKAPALLI RAMANA@CS.COLUMBIA.EDU 1 LECTURE-1 Course overview See http://www.cs.columbia.edu/~ramana Overview of HTML Formatting, headings,

More information

JavaScript I Language Basics

JavaScript I Language Basics JavaScript I Language Basics Chesapeake Node.js User Group (CNUG) https://www.meetup.com/chesapeake-region-nodejs-developers-group START BUILDING: CALLFORCODE.ORG Agenda Introduction to JavaScript Language

More information

12/22/11. Java How to Program, 9/e. public must be stored in a file that has the same name as the class and ends with the.java file-name extension.

12/22/11. Java How to Program, 9/e. public must be stored in a file that has the same name as the class and ends with the.java file-name extension. Java How to Program, 9/e Education, Inc. All Rights Reserved. } Covered in this chapter Classes Objects Methods Parameters double primitive type } Create a new class (GradeBook) } Use it to create an object.

More information

INFS 2150 Introduction to Web Development and e-commerce Technology. Programming with JavaScript

INFS 2150 Introduction to Web Development and e-commerce Technology. Programming with JavaScript INFS 2150 Introduction to Web Development and e-commerce Technology Programming with JavaScript 1 Objectives JavaScript client-side programming Example of a JavaScript program The element

More information

Objectives. Introduction to JavaScript. Introduction to JavaScript INFS Peter Y. Wu, RMU 1

Objectives. Introduction to JavaScript. Introduction to JavaScript INFS Peter Y. Wu, RMU 1 Objectives INFS 2150 Introduction to Web Development and e-commerce Technology Programming with JavaScript JavaScript client-side programming Example of a JavaScript program The element

More information

(Refer Slide Time: 01:12)

(Refer Slide Time: 01:12) Internet Technology Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture No #22 PERL Part II We continue with our discussion on the Perl

More information

What is PHP? [1] Figure 1 [1]

What is PHP? [1] Figure 1 [1] PHP What is PHP? [1] PHP is an acronym for "PHP: Hypertext Preprocessor" PHP is a widely-used, open source scripting language PHP scripts are executed on the server PHP is free to download and use Figure

More information

Java+- Language Reference Manual

Java+- Language Reference Manual Fall 2016 COMS4115 Programming Languages & Translators Java+- Language Reference Manual Authors Ashley Daguanno (ad3079) - Manager Anna Wen (aw2802) - Tester Tin Nilar Hlaing (th2520) - Systems Architect

More information

Pace University. Fundamental Concepts of CS121 1

Pace University. Fundamental Concepts of CS121 1 Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction

More information

Web Application Development (WAD) V th Sem BBAITM(Unit-1) By: Binit Patel

Web Application Development (WAD) V th Sem BBAITM(Unit-1) By: Binit Patel Web Application Development (WAD) V th Sem BBAITM(Unit-1) By: Binit Patel Introduction: PHP (Hypertext Preprocessor) was invented by Rasmus Lerdorf in 1994. First it was known as Personal Home Page. Later

More information

COMS 469: Interactive Media II

COMS 469: Interactive Media II COMS 469: Interactive Media II Agenda Review Ch. 5: JavaScript An Object-Based Language Ch. 6: Programming the Browser Review Data Types & Variables Data Types Numeric String Boolean Variables Declaring

More information

Background. Javascript is not related to Java in anyway other than trying to get some free publicity

Background. Javascript is not related to Java in anyway other than trying to get some free publicity JavaScript I Introduction JavaScript traditionally runs in an interpreter that is part of a browsers Often called a JavaScript engine Was originally designed to add interactive elements to HTML pages First

More information

PHP Personal Home Page PHP: Hypertext Preprocessor (Lecture 35-37)

PHP Personal Home Page PHP: Hypertext Preprocessor (Lecture 35-37) PHP Personal Home Page PHP: Hypertext Preprocessor (Lecture 35-37) A Server-side Scripting Programming Language An Introduction What is PHP? PHP stands for PHP: Hypertext Preprocessor. It is a server-side

More information

12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments.

12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments. Java How to Program, 9/e Education, Inc. All Rights Reserved. } Java application programming } Use tools from the JDK to compile and run programs. } Videos at www.deitel.com/books/jhtp9/ Help you get started

More information

1 Lexical Considerations

1 Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2013 Handout Decaf Language Thursday, Feb 7 The project for the course is to write a compiler

More information

Lesson 1: Writing Your First JavaScript

Lesson 1: Writing Your First JavaScript JavaScript 101 1-1 Lesson 1: Writing Your First JavaScript OBJECTIVES: In this lesson you will be taught how to Use the tag Insert JavaScript code in a Web page Hide your JavaScript

More information

Princess Nourah bint Abdulrahman University. Computer Sciences Department

Princess Nourah bint Abdulrahman University. Computer Sciences Department Princess Nourah bint Abdulrahman University 1 And use http://www.w3schools.com/ JavaScript Objectives Introduction to JavaScript Objects Data Variables Operators Types Functions Events 4 Why Study JavaScript?

More information

BEFORE CLASS. If you haven t already installed the Firebug extension for Firefox, download it now from

BEFORE CLASS. If you haven t already installed the Firebug extension for Firefox, download it now from BEFORE CLASS If you haven t already installed the Firebug extension for Firefox, download it now from http://getfirebug.com. If you don t already have the Firebug extension for Firefox, Safari, or Google

More information

Object oriented programming. Instructor: Masoud Asghari Web page: Ch: 3

Object oriented programming. Instructor: Masoud Asghari Web page:   Ch: 3 Object oriented programming Instructor: Masoud Asghari Web page: http://www.masses.ir/lectures/oops2017sut Ch: 3 1 In this slide We follow: https://docs.oracle.com/javase/tutorial/index.html Trail: Learning

More information

Introduction to JavaScript p. 1 JavaScript Myths p. 2 Versions of JavaScript p. 2 Client-Side JavaScript p. 3 JavaScript in Other Contexts p.

Introduction to JavaScript p. 1 JavaScript Myths p. 2 Versions of JavaScript p. 2 Client-Side JavaScript p. 3 JavaScript in Other Contexts p. Preface p. xiii Introduction to JavaScript p. 1 JavaScript Myths p. 2 Versions of JavaScript p. 2 Client-Side JavaScript p. 3 JavaScript in Other Contexts p. 5 Client-Side JavaScript: Executable Content

More information

What is Java Script? Writing to The HTML Document. What Can JavaScript do? CMPT 165: Java Script

What is Java Script? Writing to The HTML Document. What Can JavaScript do? CMPT 165: Java Script What is Java Script? CMPT 165: Java Script Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University November 7, 2011 JavaScript was designed to add interactivity to HTML pages

More information

JAVASCRIPT. Computer Science & Engineering LOGO

JAVASCRIPT. Computer Science & Engineering LOGO JAVASCRIPT JavaScript and Client-Side Scripting When HTML was first developed, Web pages were static Static Web pages cannot change after the browser renders them HTML and XHTML could only be used to produce

More information

CHAD Language Reference Manual

CHAD Language Reference Manual CHAD Language Reference Manual INTRODUCTION The CHAD programming language is a limited purpose programming language designed to allow teachers and students to quickly code algorithms involving arrays,

More information

JavaScript Basics. The Big Picture

JavaScript Basics. The Big Picture JavaScript Basics At this point, you should have reached a certain comfort level with typing and running JavaScript code assuming, of course, that someone has already written it for you This handout aims

More information

Lecture 3: The Basics of JavaScript. Background. Needs for Programming Capability. Origin of JavaScript. Using Client-side JavaScript

Lecture 3: The Basics of JavaScript. Background. Needs for Programming Capability. Origin of JavaScript. Using Client-side JavaScript Lecture 3: The Basics of JavaScript Wendy Liu CSC309F Fall 2007 Background Origin and facts 1 2 Needs for Programming Capability XHTML and CSS allows the browser to passively display static content How

More information

a Why JavaScript? jonkv interactivity on the web CGI JavaScript Java Applets Netscape LiveScript JavaScript 1: Example

a Why JavaScript? jonkv interactivity on the web CGI JavaScript Java Applets Netscape LiveScript JavaScript 1: Example Why JavaScript? 2 JavaScript JavaScript the language Web page manipulation with JavaScript and the DOM 1994 1995: Wanted interactivity on the web Server side interactivity: CGI Common Gateway Interface

More information

JavaScript Specialist v2.0 Exam 1D0-735

JavaScript Specialist v2.0 Exam 1D0-735 JavaScript Specialist v2.0 Exam 1D0-735 Domain 1: Essential JavaScript Principles and Practices 1.1: Identify characteristics of JavaScript and common programming practices. 1.1.1: List key JavaScript

More information

There are four numeric types: 1. Integers, represented as a 32 bit (or longer) quantity. Digits sequences (possibly) signed are integer literals:

There are four numeric types: 1. Integers, represented as a 32 bit (or longer) quantity. Digits sequences (possibly) signed are integer literals: Numeric Types There are four numeric types: 1. Integers, represented as a 32 bit (or longer) quantity. Digits sequences (possibly) signed are integer literals: 1-123 +456 2. Long integers, of unlimited

More information

JavaScript Introduction

JavaScript Introduction JavaScript Introduction Web Technologies I. Zsolt Tóth University of Miskolc 2016 Zsolt Tóth (UM) JavaScript Introduction 2016 1 / 31 Introduction Table of Contents 1 Introduction 2 Syntax Variables Control

More information

Contents. Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual

Contents. Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual Contents 1 Introduction...2 2 Lexical Conventions...2 3 Types...3 4 Syntax...3 5 Expressions...4 6 Declarations...8 7 Statements...9

More information

The C++ Language. Arizona State University 1

The C++ Language. Arizona State University 1 The C++ Language CSE100 Principles of Programming with C++ (based off Chapter 2 slides by Pearson) Ryan Dougherty Arizona State University http://www.public.asu.edu/~redoughe/ Arizona State University

More information

A JavaBean is a class file that stores Java code for a JSP

A JavaBean is a class file that stores Java code for a JSP CREATE A JAVABEAN A JavaBean is a class file that stores Java code for a JSP page. Although you can use a scriptlet to place Java code directly into a JSP page, it is considered better programming practice

More information

Typescript on LLVM Language Reference Manual

Typescript on LLVM Language Reference Manual Typescript on LLVM Language Reference Manual Ratheet Pandya UNI: rp2707 COMS 4115 H01 (CVN) 1. Introduction 2. Lexical Conventions 2.1 Tokens 2.2 Comments 2.3 Identifiers 2.4 Reserved Keywords 2.5 String

More information

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */ Overview Language Basics This chapter describes the basic elements of Rexx. It discusses the simple components that make up the language. These include script structure, elements of the language, operators,

More information

Dynamism and Detection

Dynamism and Detection 1 Dynamism and Detection c h a p t e r ch01 Page 1 Wednesday, June 23, 1999 2:52 PM IN THIS CHAPTER Project I: Generating Platform-Specific Content Project II: Printing Copyright Information and Last-Modified

More information

UNIT -II. Language-History and Versions Introduction JavaScript in Perspective-

UNIT -II. Language-History and Versions Introduction JavaScript in Perspective- UNIT -II Style Sheets: CSS-Introduction to Cascading Style Sheets-Features- Core Syntax-Style Sheets and HTML Style Rle Cascading and Inheritance-Text Properties-Box Model Normal Flow Box Layout- Beyond

More information

RTL Reference 1. JVM. 2. Lexical Conventions

RTL Reference 1. JVM. 2. Lexical Conventions RTL Reference 1. JVM Record Transformation Language (RTL) runs on the JVM. Runtime support for operations on data types are all implemented in Java. This constrains the data types to be compatible to Java's

More information

PHP and MySQL for Dynamic Web Sites. Intro Ed Crowley

PHP and MySQL for Dynamic Web Sites. Intro Ed Crowley PHP and MySQL for Dynamic Web Sites Intro Ed Crowley Class Preparation If you haven t already, download the sample scripts from: http://www.larryullman.com/books/phpand-mysql-for-dynamic-web-sitesvisual-quickpro-guide-4thedition/#downloads

More information

Code Editor. The Code Editor is made up of the following areas: Toolbar. Editable Area Output Panel Status Bar Outline. Toolbar

Code Editor. The Code Editor is made up of the following areas: Toolbar. Editable Area Output Panel Status Bar Outline. Toolbar Code Editor Wakanda s Code Editor is a powerful editor where you can write your JavaScript code for events and functions in datastore classes, attributes, Pages, widgets, and much more. Besides JavaScript,

More information

Internet & World Wide Web How to Program, 5/e by Pearson Education, Inc. All Rights Reserved.

Internet & World Wide Web How to Program, 5/e by Pearson Education, Inc. All Rights Reserved. Internet & World Wide Web How to Program, 5/e Sequential execution Execute statements in the order they appear in the code Transfer of control Changing the order in which statements execute All scripts

More information

Lecture 14. Introduction to JavaScript. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

Lecture 14. Introduction to JavaScript. Mr. Mubashir Ali Lecturer (Dept. of Computer Science) Lecture 14 Introduction to JavaScript Mr. Mubashir Ali Lecturer (Dept. of dr.mubashirali1@gmail.com 1 Outline What is JavaScript? Embedding JavaScript with HTML JavaScript conventions Variables in JavaScript

More information

A.A. 2008/09. Why introduce JavaScript. G. Cecchetti Internet Software Technologies

A.A. 2008/09. Why introduce JavaScript. G. Cecchetti Internet Software Technologies Internet t Software Technologies JavaScript part one IMCNE A.A. 2008/09 Gabriele Cecchetti Why introduce JavaScript To add dynamicity and interactivity to HTML pages 2 What s a script It s a little interpreted

More information

Basics of Java Programming

Basics of Java Programming Basics of Java Programming Lecture 2 COP 3252 Summer 2017 May 16, 2017 Components of a Java Program statements - A statement is some action or sequence of actions, given as a command in code. A statement

More information

Programming for the Web with PHP

Programming for the Web with PHP Aptech Ltd Version 1.0 Page 1 of 11 Table of Contents Aptech Ltd Version 1.0 Page 2 of 11 Abstraction Anonymous Class Apache Arithmetic Operators Array Array Identifier arsort Function Assignment Operators

More information

Lecture 05 I/O statements Printf, Scanf Simple statements, Compound statements

Lecture 05 I/O statements Printf, Scanf Simple statements, Compound statements Programming, Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 05 I/O statements Printf, Scanf Simple

More information

Exercise 1 Using Boolean variables, incorporating JavaScript code into your HTML webpage and using the document object

Exercise 1 Using Boolean variables, incorporating JavaScript code into your HTML webpage and using the document object CS1046 Lab 5 Timing: This lab should take you approximately 2 hours. Objectives: By the end of this lab you should be able to: Recognize a Boolean variable and identify the two values it can take Calculate

More information

Sprite an animation manipulation language Language Reference Manual

Sprite an animation manipulation language Language Reference Manual Sprite an animation manipulation language Language Reference Manual Team Leader Dave Smith Team Members Dan Benamy John Morales Monica Ranadive Table of Contents A. Introduction...3 B. Lexical Conventions...3

More information

Chapter 4 Basics of JavaScript

Chapter 4 Basics of JavaScript Chapter 4 Basics of JavaScript JavaScript/EcmaScript References The official EcmaScript, third edition, specification http://www.ecma-international.org/publications/files/ecma-st/ecma-262.pdf A working

More information

The PCAT Programming Language Reference Manual

The PCAT Programming Language Reference Manual The PCAT Programming Language Reference Manual Andrew Tolmach and Jingke Li Dept. of Computer Science Portland State University September 27, 1995 (revised October 15, 2002) 1 Introduction The PCAT language

More information

Fundamental of Programming (C)

Fundamental of Programming (C) Borrowed from lecturer notes by Omid Jafarinezhad Fundamental of Programming (C) Lecturer: Vahid Khodabakhshi Lecture 3 Constants, Variables, Data Types, And Operations Department of Computer Engineering

More information

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved. Assoc. Prof. Dr. Marenglen Biba (C) 2010 Pearson Education, Inc. All rights reserved. Java application A computer program that executes when you use the java command to launch the Java Virtual Machine

More information

Unit 2: Java in the small. Prepared by: Dr. Abdallah Mohamed, AOU-KW

Unit 2: Java in the small. Prepared by: Dr. Abdallah Mohamed, AOU-KW Unit 2: Java in the small Prepared by: Dr. Abdallah Mohamed, AOU-KW 1 Unit 2: Java in the small Introduction The previous unit introduced the idea of objects communicating through the invocation of methods

More information

Lexical Considerations

Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2005 Handout 6 Decaf Language Wednesday, September 7 The project for the course is to write a

More information

Arrays Structured data Arrays What is an array?

Arrays Structured data Arrays What is an array? The contents of this Supporting Material document have been prepared from the Eight units of study texts for the course M150: Date, Computing and Information, produced by The Open University, UK. Copyright

More information

Language Reference Manual

Language Reference Manual TAPE: A File Handling Language Language Reference Manual Tianhua Fang (tf2377) Alexander Sato (as4628) Priscilla Wang (pyw2102) Edwin Chan (cc3919) Programming Languages and Translators COMSW 4115 Fall

More information

E ECMAScript, 21 elements collection, HTML, 30 31, 31. Index 161

E ECMAScript, 21 elements collection, HTML, 30 31, 31. Index 161 A element, 108 accessing objects within HTML, using JavaScript, 27 28, 28 activatediv()/deactivatediv(), 114 115, 115 ActiveXObject, AJAX and, 132, 140 adding information to page dynamically, 30, 30,

More information

PHP. Interactive Web Systems

PHP. Interactive Web Systems PHP Interactive Web Systems PHP PHP is an open-source server side scripting language. PHP stands for PHP: Hypertext Preprocessor One of the most popular server side languages Second most popular on GitHub

More information

Decision Making in C

Decision Making in C Decision Making in C Decision making structures require that the programmer specify one or more conditions to be evaluated or tested by the program, along with a statement or statements to be executed

More information

Introduction to Java & Fundamental Data Types

Introduction to Java & Fundamental Data Types Introduction to Java & Fundamental Data Types LECTURER: ATHENA TOUMBOURI How to Create a New Java Project in Eclipse Eclipse is one of the most popular development environments for Java, as it contains

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

<form>. input elements. </form>

<form>. input elements. </form> CS 183 4/8/2010 A form is an area that can contain form elements. Form elements are elements that allow the user to enter information (like text fields, text area fields, drop-down menus, radio buttons,

More information

CITS1231 Web Technologies. JavaScript

CITS1231 Web Technologies. JavaScript CITS1231 Web Technologies JavaScript Contents Introduction to JavaScript Variables Operators Conditional Statements Program Loops Popup Boxes Functions 2 User Interaction User interaction requires web

More information

CHAPTER 6 JAVASCRIPT PART 1

CHAPTER 6 JAVASCRIPT PART 1 CHAPTER 6 JAVASCRIPT PART 1 1 OVERVIEW OF JAVASCRIPT JavaScript is an implementation of the ECMAScript language standard and is typically used to enable programmatic access to computational objects within

More information

Manju Muralidharan Priya. CS4PM Web Aesthetics and Development WEEK 11

Manju Muralidharan Priya. CS4PM Web Aesthetics and Development WEEK 11 CS4PM Web Aesthetics and Development WEEK 11 Objective: Understand basics of JScript Outline: a. Basics of JScript Reading: Refer to w3schools websites and use the TRY IT YOURSELF editor and play with

More information

UNIT- 3 Introduction to C++

UNIT- 3 Introduction to C++ UNIT- 3 Introduction to C++ C++ Character Sets: Letters A-Z, a-z Digits 0-9 Special Symbols Space + - * / ^ \ ( ) [ ] =!= . $, ; : %! &? _ # = @ White Spaces Blank spaces, horizontal tab, carriage

More information

Tutorial 10: Programming with JavaScript

Tutorial 10: Programming with JavaScript Tutorial 10: Programming with JavaScript College of Computing & Information Technology King Abdulaziz University CPCS-665 Internet Technology Objectives Learn the history of JavaScript Create a script

More information

CHIL CSS HTML Integrated Language

CHIL CSS HTML Integrated Language CHIL CSS HTML Integrated Language Programming Languages and Translators Fall 2013 Authors: Gil Chen Zion gc2466 Ami Kumar ak3284 Annania Melaku amm2324 Isaac White iaw2105 Professor: Prof. Stephen A. Edwards

More information

Programming with Java

Programming with Java Programming with Java Data Types & Input Statement Lecture 04 First stage Software Engineering Dep. Saman M. Omer 2017-2018 Objectives q By the end of this lecture you should be able to : ü Know rules

More information

CSCE 120: Learning To Code

CSCE 120: Learning To Code CSCE 120: Learning To Code Manipulating Data I Introduction This module is designed to get you started working with data by understanding and using variables and data types in JavaScript. It will also

More information

Key Differences Between Python and Java

Key Differences Between Python and Java Python Python supports many (but not all) aspects of object-oriented programming; but it is possible to write a Python program without making any use of OO concepts. Python is designed to be used interpretively.

More information