What Is JavaScript? A scripting language based on an object-orientated programming philosophy.

Size: px
Start display at page:

Download "What Is JavaScript? A scripting language based on an object-orientated programming philosophy."

Transcription

1 What Is JavaScript? A scripting language based on an object-orientated programming philosophy. Each object has certain attributes. Some are like adjectives: properties. For example, an object might have a, a size, and a text value. Some are like verbs: methods. For example, an object might be able to display a text message, record information, or create an alert box. What Is a Scripting Language? Scripts are a set of directions to a computer. JavaScript and VBScript are two of the most common scripting languages in use today. A program such as a web browser translates the text script into computer commands. What is the Difference between Java and JavaScript? Java is a compiled language written and then packaged into a self-executing file. To create an application with a compiled language, you typically need a special programming tool or development environment. With JavaScript, you can write a script with a text editor (Notepad, SimpleText, etc.). A script is just plain ASCII text. What Makes Up JavaScript? JavaScript contains several elements: Objects. Objects are building blocks of the script. JavaScript contains pre-defined objects, and you can create your own: document form, etc. An object has properties ("adjectives"):. ("goeshere"); An object has methods ("verbs"): document.write ("Hello!"); Operators. Operators can assign, compare, compute, and evaluate values. Operators combined with objects and variables form expressions. =, +, *, <, etc.

2 if {bears > 1 && bears < 4) then.alert ("You can probably survive this attack."}; Variables. Variables are containers that hold data. The current value in a variable can be calculated, output, passed along to other variables, etc. You can declare a variable at the beginning of a page and use it throughout the document, or you can declare a variable at the beginning of a function for just that particular function. var user = prompt ("Enter your user", "") Functions. They combine a series of statements under one and perform an action. function postmessage() {alert("are you ready?");} Events and Event Handlers. Events and event handlers respond to certain events (from the user/browser). <body onload = "postmessage()"> Arrays. Sets of variables that are saved under the same. var pages = new makearray("select a Page", "CDPL", "L571 syllabus", "IBM", "ESPN", "IU"); Where Do You Insert a Script? Depending on the use, you insert your scripts within an HTML page... Within an HTML document, marked by the <script> tag. Within an HTML tag as an event and event handler. Within an anchor tag to call a JavaScript function.

3 Hierarchy Objects Object Properties Methods Event Handlers defaultstatus frames er parent scroll self status top alert confirm prompt cleartimeout settimeout onload onunload onblur onfocus frame defaultstatus frames er parent scroll self status top alert confirm prompt cleartimeout settimeout location hash host host href path por protocol search reload replace history length forward go back navigator appcodename appname appversion mimetypes plugins useragent javaenabled document alinkcolor anchors applets area bgcolor cookie fgcolor forms clear write writeln

4 image form text images lastmodified linkcolor links location referrer title vlinkcolor border complete height hspace lowsrc src vspace width action elements encoding FileUpload method target defaultvalue type value none submit reset select onsubmit onreset onblur oncharge onfocus onselect Built-in Objects Object Properties Methods Event Handlers array length join reverse sort xx date none getdate getday gethours getminutes getmonth getseconds gettime gettimezoneoff set getyear parse

5 string length prototype prototype setdate sethours setminutes setmonth setseconds settime setyear togmtstring tolocalestring UTC anchor big blink bold charat fixed fontcolor fontsize indexof italics lastindexof link small split strike sub substring sup tolowercase touppercase Window

Javascript Hierarchy Objects Object Properties Methods Event Handlers. onload onunload onblur onfocus

Javascript Hierarchy Objects Object Properties Methods Event Handlers. onload onunload onblur onfocus Javascript Hierarchy Objects Object Properties Methods Event Handlers Window Frame Location History defaultstatus frames opener parent scroll self status top window defaultstatus frames opener parent scroll

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

Indian Institute of Technology Kharagpur. Javascript Part III. Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. I.I.T.

Indian Institute of Technology Kharagpur. Javascript Part III. Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. I.I.T. Indian Institute of Technology Kharagpur Javascript Part III Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. I.I.T. Kharagpur, INDIA Lecture 27: Javascript Part III On completion, the student

More information

PES DEGREE COLLEGE BANGALORE SOUTH CAMPUS 1 K.M. before Electronic City, Bangalore WEB PROGRAMMING Solution Set II

PES DEGREE COLLEGE BANGALORE SOUTH CAMPUS 1 K.M. before Electronic City, Bangalore WEB PROGRAMMING Solution Set II PES DEGREE COLLEGE BANGALORE SOUTH CAMPUS 1 K.M. before Electronic City, Bangalore 560 100 WEB PROGRAMMING Solution Set II Section A 1. This function evaluates a string as javascript statement or expression

More information

COMS 469: Interactive Media II

COMS 469: Interactive Media II COMS 469: Interactive Media II Agenda Review Ch. 7: HTML Forms Ch. 9: String Manipulation Review Object Oriented Programming JavaScript Native Objects Browser Objects Review OOP Terminology Object Properties

More information

Phụ lục A. Sơ đồ các đối tượng trong trình duyệt

Phụ lục A. Sơ đồ các đối tượng trong trình duyệt 1 Phụ lục A Sơ đồ các đối tượng trong trình duyệt 2 Phụ lục A window closed alert( msg ) onblur= defaultstatus back( ) ondragdrop= document blur( ) onfocus= frames[i] captureevents(type) onload= history

More information

Note: Java and JavaScript are two completely different languages in both concept and design!

Note: Java and JavaScript are two completely different languages in both concept and design! Java Script: JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a lightweight programming language JavaScript is usually embedded directly

More information

INTRODUCTION TO WEB DEVELOPMENT AND HTML. Lecture 15: JavaScript loops, Objects, Events - Spring 2011

INTRODUCTION TO WEB DEVELOPMENT AND HTML. Lecture 15: JavaScript loops, Objects, Events - Spring 2011 INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 15: JavaScript loops, Objects, Events - Spring 2011 Outline Selection Statements (if, if-else, switch) Loops (for, while, do..while) Built-in Objects: Strings

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 Methods. concat Method (Array) concat Method (String) charat Method (String)

Javascript Methods. concat Method (Array) concat Method (String) charat Method (String) charat Method (String) The charat method returns a character value equal to the character at the specified index. The first character in a string is at index 0, the second is at index 1, and so forth.

More information

LECTURE-3. Exceptions JS Events. CS3101: Programming Languages: Javascript Ramana Isukapalli

LECTURE-3. Exceptions JS Events. CS3101: Programming Languages: Javascript Ramana Isukapalli LECTURE-3 Exceptions JS Events 1 EXCEPTIONS Syntax and usage Similar to Java/C++ exception handling try { // your code here catch (excptn) { // handle error // optional throw 2 EXCEPTIONS EXAMPLE

More information

By the end of this section of the practical, the students should be able to:

By the end of this section of the practical, the students should be able to: By the end of this section of the practical, the students should be able to: Write JavaScript to generate HTML Create simple scripts which include input and output statements, arithmetic, relational and

More information

More on new. Today s Goals. CSCI 2910 Client/Server-Side Programming. Creating/Defining Objects. Creating/Defining Objects (continued)

More on new. Today s Goals. CSCI 2910 Client/Server-Side Programming. Creating/Defining Objects. Creating/Defining Objects (continued) CSCI 2910 Client/Server-Side Programming Topic: Advanced JavaScript Topics Today s Goals Today s lecture will cover: More on new and objects Built in objects Image, String, Date, Boolean, and Number The

More information

Version 1, January 22, As taken from Netscape Corporation s World Wide Web Site

Version 1, January 22, As taken from Netscape Corporation s World Wide Web Site Version 1, January 22, 1996 As taken from Netscape Corporation s World Wide Web Site 1 JavaScript Working Document 4 The Mother of all Disclaimers 5 Learning JavaScript 5 JavaScript and Java 5 JavaScript

More information

JAVASCRIPT BASICS. JavaScript String Functions. Here is the basic condition you have to follow. If you start a string with

JAVASCRIPT BASICS. JavaScript String Functions. Here is the basic condition you have to follow. If you start a string with JavaScript String Functions Description String constants can be specified by enclosing characters or strings within double quotes, e.g. "WikiTechy is the best site to learn JavaScript". A string constant

More information

Chapter 12. JavaScript 1: Basic Scripting Table of Contents

Chapter 12. JavaScript 1: Basic Scripting Table of Contents Chapter 12. JavaScript 1: Basic Scripting Table of Contents Objectives... 2 11.1 Introduction... 2 11.1.1 Differences between JavaScript and Java... 2 11.2 JavaScript within HTML... 3 11.2.1 Arguments...

More information

710 Index Attributes, 127 action attribute, 263 assigning, bottom attribute, domain name attribute, 481 expiration date attribute, 480 8

710 Index Attributes, 127 action attribute, 263 assigning, bottom attribute, domain name attribute, 481 expiration date attribute, 480 8 INDEX Symbols = (assignment operator), 56 \ (backslash), 33 \b (backspace), 33 \" (double quotation mark), 32 \e (escape), 33 \f (form feed), 33

More information

About the Tutorial. Audience. Prerequisites. Copyright and Disclaimer

About the Tutorial. Audience. Prerequisites. Copyright and Disclaimer About the Tutorial JavaScript is a lightweight, interpreted programming language. It is designed for creating network-centric applications. It is complimentary to and integrated with Java. JavaScript is

More information

Tema 5 JavaScript JavaScriptand and

Tema 5 JavaScript JavaScriptand and escuela técnica superior de ingeniería informática Versión original: Amador Durán, David Benavides y Pablo Fernandez (noviembre 2006 Manuel Resinas (noviembre 2007); Reestructuración de contenido. Última

More information

Try the following example using the Try it option available at the top right corner of the below sample code box

Try the following example using the Try it option available at the top right corner of the below sample code box About the Tutorial CoffeeScript is a lightweight language which transcompiles into JavaScript. It provides better syntax avoiding the quirky parts of JavaScript, still retaining the flexibility and beauty

More information

UNIT 3 SECTION 1 Answer the following questions Q.1: What is an editor? editor editor Q.2: What do you understand by a web browser?

UNIT 3 SECTION 1 Answer the following questions Q.1: What is an editor? editor editor Q.2: What do you understand by a web browser? UNIT 3 SECTION 1 Answer the following questions Q.1: What is an editor? A 1: A text editor is a program that helps you write plain text (without any formatting) and save it to a file. A good example is

More information

Web Programming Step by Step

Web Programming Step by Step Web Programming Step by Step Lecture 15 Unobtrusive JavaScript Reading: 8.1-8.3 Except where otherwise noted, the contents of this presentation are Copyright 2009 Marty Stepp and Jessica Miller. 8.1: Global

More information

CITS1231 Web Technologies. JavaScript Math, String, Array, Number, Debugging

CITS1231 Web Technologies. JavaScript Math, String, Array, Number, Debugging CITS1231 Web Technologies JavaScript Math, String, Array, Number, Debugging Last Lecture Introduction to JavaScript Variables Operators Conditional Statements Program Loops Popup Boxes Functions 3 This

More information

5.4 JavaScript Objects and Methods

5.4 JavaScript Objects and Methods CHAPTER 5: JavaScript Basics 117 5.4 JavaScript Objects and Methods JavaScript Objects and Properties Aggregate real world data types An object has properties and methods o Constructors for creating objects

More information

New Perspectives on Creating Web Pages with HTML. Tutorial Objectives

New Perspectives on Creating Web Pages with HTML. Tutorial Objectives New Perspectives on Creating Web Pages with HTML Tutorial 9: Working with JavaScript Objects and Events 1 Tutorial Objectives Learn about form validation Study the object-based nature of the JavaScript

More information

Chapter 1 Introduction to Computers and the Internet

Chapter 1 Introduction to Computers and the Internet CPET 499/ITC 250 Web Systems Dec. 6, 2012 Review of Courses Chapter 1 Introduction to Computers and the Internet The Internet in Industry & Research o E Commerce & Business o Mobile Computing and SmartPhone

More information

LECTURE-2. Functions review HTML Forms. Arrays Exceptions Events. CS3101: Scripting Languages: Javascript Ramana Isukapalli

LECTURE-2. Functions review HTML Forms. Arrays Exceptions Events. CS3101: Scripting Languages: Javascript Ramana Isukapalli LECTURE-2 Functions review HTML Forms Arrays Exceptions Events 1 JAVASCRIPT FUNCTIONS, REVIEW Syntax function (params) { // code Note: Parameters do NOT have variable type. 1. Recall: Function

More information

Fundamentals of Website Development

Fundamentals of Website Development Fundamentals of Website Development CSC 2320, Fall 2015 The Department of Computer Science Events handler Element with attribute onclick. Onclick with call function Function defined in your script or library.

More information

JAVASCRIPT. Ajax Technology in Web Programming. Sergio Luján Mora. DLSI - Universidad de Alicante 1. Basic syntax and features

JAVASCRIPT. Ajax Technology in Web Programming. Sergio Luján Mora. DLSI - Universidad de Alicante 1. Basic syntax and features Departamento de Lenguajes y Sistemas Informáticos Ajax Technology in Web Programming Sergio Luján Mora Basic syntax and features JAVASCRIPT DLSI - Universidad de Alicante 1 Index Introduction Including

More information

Lecture 17. History, Navigator, Screen and Form Objects. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

Lecture 17. History, Navigator, Screen and Form Objects. Mr. Mubashir Ali Lecturer (Dept. of Computer Science) Lecture 17 History, Navigator, Screen and Form Objects Mr. Mubashir Ali Lecturer (Dept. of Computer Science) dr.mubashirali1@gmail.com 1 Summary of the previous lecture Controlling the background dynamically

More information

Tema 5 JavaScript JavaScriptand and

Tema 5 JavaScript JavaScriptand and Versión original: Amador Durán, David Benavides y Pablo Fernandez (noviembre 2006) Última revisión: Manuel Resinas (noviembre 2007); Reestructuración de contenido. Tiempo: 4h [Ángel US V7] Diseño: Amador

More information

Javascript. Many examples from Kyle Simpson: Scope and Closures

Javascript. Many examples from Kyle Simpson: Scope and Closures Javascript Many examples from Kyle Simpson: Scope and Closures What is JavaScript? Not related to Java (except that syntax is C/Java- like) Created by Brendan Eich at Netscape later standardized through

More information

Basics of JavaScript. Last Week. Needs for Programming Capability. Browser as Development Platform. Using Client-side JavaScript. Origin of JavaScript

Basics of JavaScript. Last Week. Needs for Programming Capability. Browser as Development Platform. Using Client-side JavaScript. Origin of JavaScript Basics of JavaScript History of the Web XHTML CSS Last Week Nan Niu (nn@cs.toronto.edu) CSC309 -- Fall 2008 2 Needs for Programming Capability XHTML and CSS allows the browser to passively display static

More information

Like most objects, String objects need to be created before they can be used. To create a String object, we can write

Like most objects, String objects need to be created before they can be used. To create a String object, we can write JavaScript Native Objects Broswer Objects JavaScript Native Objects So far we have just been looking at what objects are, how to create them, and how to use them. Now, let's take a look at some of the

More information

JavaScript and XHTML. Prof. D. Krupesha, PESIT, Bangalore

JavaScript and XHTML. Prof. D. Krupesha, PESIT, Bangalore JavaScript and XHTML Prof. D. Krupesha, PESIT, Bangalore Why is JavaScript Important? It is simple and lots of scripts available in public domain and easy to use. It is used for client-side scripting.

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

5. JavaScript Basics

5. JavaScript Basics CHAPTER 5: JavaScript Basics 88 5. JavaScript Basics 5.1 An Introduction to JavaScript A Programming language for creating active user interface on Web pages JavaScript script is added in an HTML page,

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

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS MOST TAGS CLASS Divides tags into groups for applying styles 202 ID Identifies a specific tag 201 STYLE Applies a style locally 200 TITLE Adds tool tips to elements 181 Identifies the HTML version

More information

Pearson Education Limited Edinburgh Gate Harlow Essex CM20 2JE England and Associated Companies throughout the world

Pearson Education Limited Edinburgh Gate Harlow Essex CM20 2JE England and Associated Companies throughout the world Pearson Education Limited Edinburgh Gate Harlow Essex CM20 2JE England and Associated Companies throughout the world Visit us on the World Wide Web at: www.pearsoned.co.uk Pearson Education Limited 2014

More information

Lotus Using JavaScript in IBM Lotus Domino 7 Applications.

Lotus Using JavaScript in IBM Lotus Domino 7 Applications. Lotus 190-753 Using JavaScript in IBM Lotus Domino 7 Applications http://killexams.com/exam-detail/190-753 B. Remove the input validation formulas. Code a function to validate the user input and call this

More information

COMS 469: Interactive Media II

COMS 469: Interactive Media II COMS 469: Interactive Media II Agenda Review Ch. 8: Windows and Frames (pp. 263-299) Ch. 11: Storing Info: Cookies (pp. 367-389) Review HTML Forms String Manipulation Objects document.myform document.forms[0]

More information

Netscape Introduction to the JavaScript Language

Netscape Introduction to the JavaScript Language Netscape Introduction to the JavaScript Language Netscape: Introduction to the JavaScript Language Eckart Walther Netscape Communications Serving Up: JavaScript Overview Server-side JavaScript LiveConnect:

More information

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2) What is JavaScript?

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2) What is JavaScript? Web Development & Design Foundations with HTML5 Ninth Edition Chapter 14 A Brief Look at JavaScript and jquery Slides in this presentation contain hyperlinks. JAWS users should be able to get a list of

More information

PIC 40A. Lecture 10: JS: Wrapper objects, Input and Output, Control structures, random numbers. Copyright 2011 Jukka Virtanen UCLA 1 04/24/17

PIC 40A. Lecture 10: JS: Wrapper objects, Input and Output, Control structures, random numbers. Copyright 2011 Jukka Virtanen UCLA 1 04/24/17 PIC 40A Lecture 10: JS: Wrapper objects, Input and Output, Control structures, random numbers 04/24/17 Copyright 2011 Jukka Virtanen UCLA 1 Objects in JS In C++ we have classes, in JS we have OBJECTS.

More information

JavaScript Handling Events Page 1

JavaScript Handling Events Page 1 JavaScript Handling Events Page 1 1 2 3 4 5 6 7 8 Handling Events JavaScript JavaScript Events (Page 1) An HTML event is something interesting that happens to an HTML element Can include: Web document

More information

JAVASCRIPT BASICS. Handling Events In JavaScript. In programing, event-driven programming could be a programming

JAVASCRIPT BASICS. Handling Events In JavaScript. In programing, event-driven programming could be a programming Handling s In JavaScript In programing, event-driven programming could be a programming paradigm during which the flow of the program is set by events like user actions (mouse clicks, key presses), sensor

More information

Web Development & Design Foundations with HTML5

Web Development & Design Foundations with HTML5 1 Web Development & Design Foundations with HTML5 CHAPTER 14 A BRIEF LOOK AT JAVASCRIPT Copyright Terry Felke-Morris 2 Learning Outcomes In this chapter, you will learn how to: Describe common uses of

More information

Lesson 5: Introduction to Events

Lesson 5: Introduction to Events JavaScript 101 5-1 Lesson 5: Introduction to Events OBJECTIVES: In this lesson you will learn about Event driven programming Events and event handlers The onclick event handler for hyperlinks The onclick

More information

Name Related Elements Type Default Depr. DTD Comment

Name Related Elements Type Default Depr. DTD Comment Legend: Deprecated, Loose DTD, Frameset DTD Name Related Elements Type Default Depr. DTD Comment abbr TD, TH %Text; accept-charset FORM %Charsets; accept FORM, INPUT %ContentTypes; abbreviation for header

More information

Recall: Document Object Model (DOM)

Recall: Document Object Model (DOM) Page 1 Document Object Model (DOM) CSE 190 M (Web Programming), Spring 2007 University of Washington References: Forbes/Steele, Chipman (much of this content was stolen from them) Recall: Document Object

More information

448 JavaScript/JScript: Objects Chapter 13

448 JavaScript/JScript: Objects Chapter 13 iw3htp_13.fm Page 448 Thursday, April 13, 2000 12:35 PM 448 JavaScript/JScript: Objects Chapter 13 13 JavaScript/JScript: Objects Method Description Example abs( x ) absolute value of x if x > 0 then abs(

More information

About the Author. Liability

About the Author. Liability II Liability The purpose of this book is to provide basic guides for people interested in JavaScript. Although every effort and care has been taken to make the information as accurate as possible, the

More information

Best Practices Chapter 5

Best Practices Chapter 5 Best Practices Chapter 5 Chapter 5 CHRIS HOY 12/11/2015 COMW-283 Chapter 5 The DOM and BOM The BOM stand for the Browser Object Model, it s also the client-side of the web hierarchy. It is made up of a

More information

Go.Web Style Guide. Oct. 16, Hackensack Ave Hackensack, NJ GoAmerica, Inc. All rights reserved.

Go.Web Style Guide. Oct. 16, Hackensack Ave Hackensack, NJ GoAmerica, Inc. All rights reserved. Go.Web Style Guide Oct. 16, 2000 www.goamerica.net 2000 GoAmerica, Inc. All rights reserved. 401 Hackensack Ave Hackensack, NJ 07601 888 462 4600 Go.Web Style Guide 2 Introduction Go.Web is GoAmerica s

More information

INTRODUCTION TO WEB DEVELOPMENT AND HTML. Lecture 13: Intro to JavaScript - Spring 2011

INTRODUCTION TO WEB DEVELOPMENT AND HTML. Lecture 13: Intro to JavaScript - Spring 2011 INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 13: Intro to JavaScript - Spring 2011 Outline Intro to JavaScript What is JavaScript? JavaScript!= Java Intro to JavaScript JavaScript is a lightweight

More information

JavaScript!= Java. Intro to JavaScript. What is JavaScript? Intro to JavaScript 4/17/2013 INTRODUCTION TO WEB DEVELOPMENT AND HTML

JavaScript!= Java. Intro to JavaScript. What is JavaScript? Intro to JavaScript 4/17/2013 INTRODUCTION TO WEB DEVELOPMENT AND HTML INTRODUCTION TO WEB DEVELOPMENT AND HTML Intro to JavaScript Lecture 13: Intro to JavaScript - Spring 2013 What is JavaScript? JavaScript!= Java Intro to JavaScript JavaScript is a lightweight programming

More information

Try the following example using the Try it option available at the top right corner of the below sample code box

Try the following example using the Try it option available at the top right corner of the below sample code box About the Tutorial CoffeeScript is a lightweight language which transcompiles into JavaScript. It provides better syntax avoiding the quirky parts of JavaScript, still retaining the flexibility and beauty

More information

CISH-6510 Web Application Design and Development. Overview of JavaScript. Overview

CISH-6510 Web Application Design and Development. Overview of JavaScript. Overview CISH-6510 Web Application Design and Development Overview of JavaScript Overview What is JavaScript? History Uses of JavaScript Location of Code Simple Alert Example Events Events Example Color Example

More information

Index. syntax, 140 tostring() method, 141 valueof() method, 141 break statement, 185

Index. syntax, 140 tostring() method, 141 valueof() method, 141 break statement, 185 Index A Anonymous functions, 47 appdetail property, 81 Arithmetic operators, 198 Arrays access arrays, 41 array with data, 134 array elements vs. properties, 42 assign values, 42 concat() method, 135 constructor,

More information

Uniform Resource Locators (URL)

Uniform Resource Locators (URL) The World Wide Web Web Web site consists of simply of pages of text and images A web pages are render by a web browser Retrieving a webpage online: Client open a web browser on the local machine The web

More information

Full file at https://fratstock.eu Tutorial 2: Working with Operators and Expressions

Full file at https://fratstock.eu Tutorial 2: Working with Operators and Expressions Tutorial 2: Working with Operators and Expressions TRUE/FALSE 1. You can add a dynamic effect to a Web site using ontime processing. ANS: F PTS: 1 REF: JVS 54 2. You can not insert values into a Web form

More information

How to put a JavaScript into an HTML document

How to put a JavaScript into an HTML document How to put a JavaScript into an HTML document document.write("hello World!") And it produces this output: Hello World! To insert a script in an HTML document, use the

More information

SUB Gfittingen A nd Editi S«BEX- SAN FRANCISCO PARIS DUSSELDORF SOEST LONDON

SUB Gfittingen A nd Editi S«BEX- SAN FRANCISCO PARIS DUSSELDORF SOEST LONDON SUB Gfittingen 213 545 233 2001 A 9390 nd Editi S«BEX- SAN FRANCISCO PARIS DUSSELDORF SOEST LONDON CONTENTS Introduction xxiii Part I Introducing HTML 1 Chapter 1 a Introducing Web Pages and HTML 3 An

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

INDEX SYMBOLS See also

INDEX SYMBOLS See also INDEX SYMBOLS @ characters, PHP methods, 125 $ SERVER global array variable, 187 $() function, 176 $F() function, 176-177 elements, Rico, 184, 187 elements, 102 containers,

More information

5. Strict mode use strict ; 6. Statement without semicolon, with semicolon 7. Keywords 8. Variables var keyword and global scope variable 9.

5. Strict mode use strict ; 6. Statement without semicolon, with semicolon 7. Keywords 8. Variables var keyword and global scope variable 9. Javascript 1) Javascript Implementation 1. The Core(ECMAScript) 2. DOM 3. BOM 2) ECMAScript describes 1. Syntax 2. Types 3. Statements 4. Keywords 5. Reserved words 6. Operators 7. Objects 3) DOM 1. Tree

More information

Session 16. JavaScript Part 1. Reading

Session 16. JavaScript Part 1. Reading Session 16 JavaScript Part 1 1 Reading Reading Wikipedia en.wikipedia.org/wiki/javascript / p W3C www.w3.org/tr/rec-html40/interact/scripts.html Web Developers Notes www.webdevelopersnotes.com/tutorials/javascript/

More information

Introduction to DHTML

Introduction to DHTML Introduction to DHTML HTML is based on thinking of a web page like a printed page: a document that is rendered once and that is static once rendered. The idea behind Dynamic HTML (DHTML), however, is to

More information

Session 6. JavaScript Part 1. Reading

Session 6. JavaScript Part 1. Reading Session 6 JavaScript Part 1 Reading Reading Wikipedia en.wikipedia.org/wiki/javascript Web Developers Notes www.webdevelopersnotes.com/tutorials/javascript/ JavaScript Debugging www.w3schools.com/js/js_debugging.asp

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

Web Programming/Scripting: JavaScript

Web Programming/Scripting: JavaScript CS 312 Internet Concepts Web Programming/Scripting: JavaScript Dr. Michele Weigle Department of Computer Science Old Dominion University mweigle@cs.odu.edu http://www.cs.odu.edu/~mweigle/cs312-f11/ 1 Outline!

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

UNIT-4 JAVASCRIPT. Prequisite HTML/XHTML. Origins

UNIT-4 JAVASCRIPT. Prequisite HTML/XHTML. Origins UNIT-4 JAVASCRIPT Overview of JavaScript JavaScript is a sequence of statements to be executed by the browser. It is most popular scripting language on the internet, and works in all major browsers, such

More information

LAB MANUAL SUBJECT: WEB TECHNOLOGY CLASS : T.E (COMPUTER) SEMESTER: VI

LAB MANUAL SUBJECT: WEB TECHNOLOGY CLASS : T.E (COMPUTER) SEMESTER: VI LAB MANUAL SUBJECT: WEB TECHNOLOGY CLASS : T.E (COMPUTER) SEMESTER: VI INDEX No. Title Pag e No. 1 Implements Basic HTML Tags 3 2 Implementation Of Table Tag 4 3 Implementation Of FRAMES 5 4 Design A FORM

More information

New Media Production Lecture 7 Javascript

New Media Production Lecture 7 Javascript New Media Production Lecture 7 Javascript Javascript Javascript and Java have almost nothing in common. Netscape developed a scripting language called LiveScript. When Sun developed Java, and wanted Netscape

More information

ROSAEC Survey Workshop SELab. Soohyun Baik

ROSAEC Survey Workshop SELab. Soohyun Baik ROSAEC Survey Workshop SELab. Soohyun Baik Cross-Site Scripting Prevention with Dynamic Data Tainting and Static Analysis Philipp Vogt, Florian Nentwich, Nenad Jovanovic, Engin Kirda, Christopher Kruegel,

More information

Chapter 15 Plug-ins, ActiveX, and Applets

Chapter 15 Plug-ins, ActiveX, and Applets Chapter 15 Plug-ins, ActiveX, and Applets Presented by Thomas Powell Slides adopted from HTML & XHTML: The Complete Reference, 4th Edition 2003 Thomas A. Powell Web Programming Toolbox Redux Java Applets

More information

Chapter 12 - JavaScript: Objects

Chapter 12 - JavaScript: Objects Chapter 12 - JavaScript: Objects 1 Outline 12.1 Introduction 12.2 Thinking About Objects 12.3 Math Object 12. String Object 12..1 Fundamentals of Characters and Strings 12..2 s of the String Object 12..3

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

The first sample. What is JavaScript?

The first sample. What is JavaScript? Java Script Introduction JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as Internet Explorer, Firefox, Chrome, Opera, and Safari. In this lecture

More information

NAME: name a section of the page TARGET = "_blank" "_parent" "_self" "_top" window name which window the document should go in

NAME: name a section of the page TARGET = _blank _parent _self _top window name which window the document should go in Anchor HREF: URL you are linking to Bold Base Address NAME: name a section of the page TARGET = "_blank" "_parent" "_self"

More information

CECS 189D EXAMINATION #1

CECS 189D EXAMINATION #1 CECS 189D EXAMINATION #1 SPRING 10 70 points MULTIPLE CHOICE 2 points for each correct answer Identify the choice that best answers the question on a Scantron 882 with a pencil #2. When you're on the campus

More information

Key features. Nothing to do with java It is the Client-side scripting language Designed to add interactivity to HTML pages

Key features. Nothing to do with java It is the Client-side scripting language Designed to add interactivity to HTML pages Javascript Key features Nothing to do with java It is the Client-side scripting language Designed to add interactivity to HTML pages (DHTML): Event-driven programming model AJAX Great example: Google Maps

More information

Introduction to JavaScript

Introduction to JavaScript 127 Lesson 14 Introduction to JavaScript Aim Objectives : To provide an introduction about JavaScript : To give an idea about, What is JavaScript? How to create a simple JavaScript? More about Java Script

More information

1. Cascading Style Sheet and JavaScript

1. Cascading Style Sheet and JavaScript 1. Cascading Style Sheet and JavaScript Cascading Style Sheet or CSS allows you to specify styles for visual element of the website. Styles specify the appearance of particular page element on the screen.

More information

HTML OBJECTIVES WHAT IS HTML? BY FAITH BRENNER AN INTRODUCTION

HTML OBJECTIVES WHAT IS HTML? BY FAITH BRENNER AN INTRODUCTION HTML AN INTRODUCTION BY FAITH BRENNER 1 OBJECTIVES BY THE END OF THIS LESSON YOU WILL: UNDERSTAND HTML BASICS AND WHAT YOU CAN DO WITH IT BE ABLE TO USE BASIC HTML TAGS BE ABLE TO USE SOME BASIC FORMATTING

More information

JAVA SCRIPT. RK University MCA Dept. Mr. Sandip Kaswala Page 1

JAVA SCRIPT. RK University MCA Dept. Mr. Sandip Kaswala Page 1 What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language (a scripting language is a lightweight programming language) A JavaScript consists of lines

More information

JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK

JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK Programming for Digital Media EE1707 JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK 1 References and Sources 1. Javascript & JQuery: interactive front-end

More information

Canvas & Brush Reference. Source: stock.xchng, Maarten Uilenbroek

Canvas & Brush Reference. Source: stock.xchng, Maarten Uilenbroek Canvas & Brush Reference Source: stock.xchng, Maarten Uilenbroek Canvas Hierarchy WACanvas WAHtmlCanvas WARenderCanvas WAStaticHtmlCanvas Brush Hierarchy WABrush WACompound WADateInput WATimeInput WATagBrush

More information

COMP519 Web Programming Lecture 16: JavaScript (Part 7) Handouts

COMP519 Web Programming Lecture 16: JavaScript (Part 7) Handouts COMP519 Web Programming Lecture 16: JavaScript (Part 7) Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool

More information

HTML User Interface Controls. Interactive HTML user interfaces. Document Object Model (DOM)

HTML User Interface Controls. Interactive HTML user interfaces. Document Object Model (DOM) Page 1 HTML User Interface Controls CSE 190 M (Web Programming), Spring 2007 University of Washington Reading: Sebesta Ch. 5 sections 5.1-5.7.2, Ch. 2 sections 2.9-2.9.4 Interactive HTML user interfaces

More information

CITS1231 Web Technologies

CITS1231 Web Technologies CITS1231 Web Technologies Client side id Form Validation using JavaScript Objectives Recall how to create forms on web pages Understand the need for client side validation Know how to reference form elements

More information

JAVASCRIPT FOR PROGRAMMERS

JAVASCRIPT FOR PROGRAMMERS JAVASCRIPT FOR PROGRAMMERS DEITEL DEVELOPER SERIES Paul J. Deitel Deitel & Associates, Inc. Harvey M. Deitel Deitel & Associates, Inc. PRENTICE HALL Upper Saddle River, NJ Boston Indianapolis San Francisco

More information

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX KillTest Q&A Exam : LOT-753 Title : Using JavaScript in IBM Lotus Domino 7 Applications Version : DEMO 1 / 7 1.Clara used three Domino subforms to create a page on the Web. How many HTML form tags were

More information

CICS 515 a Internet Programming Week 3. Mike Feeley

CICS 515 a Internet Programming Week 3. Mike Feeley CICS 515 a Internet Programming Week 3 Mike Feeley JavaScript JavaScript is not Java client-side scripting language program that runs in browser at client two ways to include it in HTML document embedded

More information

The Web, revisited WEB 2.0.

The Web, revisited WEB 2.0. 1 The Web, revisited WEB 2.0 marco.ronchetti@unitn.it 1 Credits: Some of the slides are based on material adapted from www.telerik.com/documents/telerik_and_ajax.pdf 2 The old web: 1994 HTML pages (hyperlinks)

More information

3. WWW and HTTP. Fig.3.1 Architecture of WWW

3. WWW and HTTP. Fig.3.1 Architecture of WWW 3. WWW and HTTP The World Wide Web (WWW) is a repository of information linked together from points all over the world. The WWW has a unique combination of flexibility, portability, and user-friendly features

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