JavaScript Overview By Kevin Harville.

Slides:



Advertisements
Similar presentations
Introducing JavaScript
Advertisements

Essentials for Design JavaScript Level One Michael Brooks
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Introduction to JavaScript
The Web Warrior Guide to Web Design Technologies
JavaScript 101 Lesson 01: Writing Your First JavaScript.
MSc. Publishing on WWW JavaScript. What is JavaScript? A scripting language devised by Netscape Adds functionality to web pages by: Embedding code into.
1 Owais Mohammad Haq Department of Computer Science Eastern Michigan University April, 2005 Java Script.
JavaScript- Introduction. What it is and what it does? What it is? It is NOT Java It is NOT Server-side programming Users can see code It is a client-side.
Tutorial 10 Programming with JavaScript
HTML Recall that HTML is static in that it describes how a page is to be displayed, but it doesn’t provide for interaction or animation. A page created.
JavaScript 101 Lesson 5: Introduction to Events. Lesson Topics Event driven programming Events and event handlers The onClick event handler for hyperlinks.
(CS1301) Introduction to Computer Programming City Univ of HK / Dept of CS / Helena Wong 1. Overview of Programming and JavaScript - 1
2012 •••••••••••••••••••••••••••••••••• Summer WorkShop Mostafa Badr
Introduction to JavaScript. Aim To enable you to write you first JavaScript.
Introduction to scripting
Lecture Note 3: ASP Syntax.  ASP Syntax  ASP Syntax ASP Code is Browser-Independent. You cannot view the ASP source code by selecting "View source"
CS346 - Javascript 1, 21 Module 1 Introduction to JavaScript CS346.
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
Programming with JavaScript (Chapter 10). XP Various things Midterm grades: Friday Winter Career Fair – Thursday, April 28, 2011 (11 am to 3 pm). – MAC.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and check boxes using HTML Add a pull-down.
What is Java Script? An extension to HTML. An extension to HTML. Allows authors to incorporate some functionality in their web pages. (without using CGI.
Javascript. Outline Introduction Fundamental of JavaScript Javascript events management DOM and Dynamic HTML (DHTML)
Lesson13. JavaScript JavaScript is an interpreted language, designed to function within a web browser. It can also be used on the server.
1 JavaScript in Context. Server-Side Programming.
Tutorial 10 Programming with JavaScript. XP Objectives Learn the history of JavaScript Create a script element Understand basic JavaScript syntax Write.
Client-Side Scripting JavaScript.  produced by Netscape for use within HTML Web pages.  built into all the major modern browsers. properties  lightweight,
Introduction.  The scripting language most often used for client-side web development.  Influenced by many programming languages, easier for nonprogrammers.
JavaScript - A Web Script Language Fred Durao
Javascript. What is JavaScript? Scripting (interpreted) language designed for the web Beware: JavaScript is case sensitive.
JavaScript - Basic Concepts Prepared and Presented by Hienvinh Nguyen, Afshin Tiraie.
An Introduction to JavaScript By: John Coliton Tuesday, November 10, 1998 Center for Teaching and Learning.
Sahar Mosleh California State University San MarcosPage 1 JavaScript Basic.
JavaScript Introduction.  JavaScript is a scripting language  A scripting language is a lightweight programming language  A JavaScript can be inserted.
Introduction into JavaScript Java 1 JavaScript JavaScript programs run from within an HTML document The statements that make up a program in an HTML.
HTML Overview Part 5 – JavaScript 1. Scripts 2  Scripts are used to add dynamic content to a web page.  Scripts consist of a list of commands that execute.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
Javascript Overview. What is Javascript? May be one of the most popular programming languages ever Runs in the browser, not on the server All modern browsers.
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
Introduction to Computer Programming 1. Overview of Programming and JavaScript - 1http:// Overview of Programming and JavaScript.
ASP Syntax Y.-H. Chen International College Ming-Chuan University Fall, 2004.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
JavaScript 101 Lesson 6: Introduction to Functions.
JavaScript and AJAX 2nd Edition Tutorial 1 Programming with JavaScript.
Introduction to Web Site Development Department of Computer Science California State University, Los Angeles Lecture 9: JavaScript.
Copyright © Terry Felke-Morris Web Development & Design Foundations with HTML5 8 th Edition CHAPTER 14 KEY CONCEPTS 1 Copyright.
Module 1 Introduction to JavaScript
Web Basics: HTML/CSS/JavaScript What are they?
Java Script Introduction. Java Script Introduction.
Section 17.1 Section 17.2 Add an audio file using HTML
Web Development & Design Foundations with HTML5 7th Edition
Exploring JavaScript Ch 14
Introduction to Scripting
Javascript Short Introduction By Thanawat Varintree,
Introduction to JavaScript
JavaScript Introduction
DHTML Javascript Internet Technology.
Introduction to JavaScript
DHTML Javascript Internet Technology.
Introduction to JavaScript
Tutorial 10 Programming with JavaScript
Recognizing JavaScript Features
An Introduction to JavaScript
Introduction to Programming and JavaScript
JavaScript: Introduction to Scripting
CNIT 133 Interactive Web Pags – JavaScript and AJAX
Introduction to JavaScript
Presentation transcript:

JavaScript Overview By Kevin Harville

JavaScript Designed by Netscape and Sun for Browsers. Based on the syntax of, but NOT Java. Originally LiveScript. Microsoft’s version is Jscript. ECMAScript is standard. We will simply refer to it as JavaScript.

Including JavaScript – 3 possible locations General JavaScript is included in the head section of our HTML document. JavaScript displayed at a particular point in a page is inserted at that point. Event Handlers are attached to HTML elements. They are run when an action associated with that tag takes place.

The HTML: <script language =“JavaScript” --> </script>

The HTML: </script> <script language =“JavaScript” --> // We can freely indicate comments // Two slashes indicate // a JavaScript Comment /* Slash-Asterisk starts a multi-line Comment. Asterisk-Slash ends it. */ </script> </script>

The HTML: <script language =“JavaScript” --> <!– Comment hides it from old browsers // Use a JavaScript comment also // to end your HTML Comment, like this: // -- > </script>

Event Handlers Event Handlers are associated with a particular HTML tag: <input type = “button” onClick = “alert(‘Hello’)” … >

Event Handlers and Functions Usually an event handler will refer to a function. A function is a section of code that performs a particular task and can give you the answer of a computation. Function code is usually in the head section.

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

Generating Text Output: We can quickly generate 3 types of prompt windows: Alert(“Hello”); Answer = confirm(“Continue?”); Answer = prompt(“Enter your name”); The default answer is optional: Answer = prompt(“What is your name?”, “Homer”);

We can write to the document document.write(“Hello”) Maybe we want to write HTML: document.write(“<h1>Hello</h1>”); If we want to make sure that the text file has a line break we can use writeln rather than write. document.writeln(“Go to a new line”);

Writing to the status bar: window.status = “Hello”;