Introduction.  The scripting language most often used for client-side web development.  Influenced by many programming languages, easier for nonprogrammers.

Slides:



Advertisements
Similar presentations
Introducing JavaScript
Advertisements

JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Introduction to JavaScript
Lesson 12- Unit L Programming Web Pages with JavaScript.
The Web Warrior Guide to Web Design Technologies
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
Tutorial 10 Programming with JavaScript
XP 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial 10.
XP Tutorial 1 New Perspectives on JavaScript, Comprehensive1 Introducing JavaScript Hiding Addresses from Spammers.
2012 •••••••••••••••••••••••••••••••••• Summer WorkShop Mostafa Badr
Introduction To JavaScript What JavaScript Is: a general purpose scripting language that allows a static page to interact with users and respond to events.
Introduction to scripting
Javascript and the Web Whys and Hows of Javascript.
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,
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)
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
1 JavaScript in Context. Server-Side Programming.
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 2: What is JavaScript?
Tutorial 10 Programming with JavaScript. XP Objectives Learn the history of JavaScript Create a script element Understand basic JavaScript syntax Write.
Tutorial 10 Programming with JavaScript
Done by: Hanadi Muhsen1 Tutorial 1.  Learn the history of JavaScript  Create a script element  Write text to a Web page with JavaScript  Understand.
JavaScript - A Web Script Language Fred Durao
LOGO Introduction to Client-Side Scripting and JavaScript CHAPTER 9 Eastern Mediterranean University School of Computing and Technology Department of Information.
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
Dr. Qusai Abuein1 Internet & WWW How to program Chap.(6) JavaScript:Introduction to Scripting.
1 JavaScript
JavaScript Syntax, how to use it in a HTML document
Introduction to JavaScript CS101 Introduction to Computing.
ECA 225 Applied Interactive Programming1 ECA 225 Applied Online Programming basics.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
Introduction into JavaScript Java 1 JavaScript JavaScript programs run from within an HTML document The statements that make up a program in an HTML.
1 JavaScript in Context. Server-Side Programming.
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.
CIS 3.5 Lecture 2.3 "Introduction to JavaScript".
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
Beginning JavaScript 4 th Edition. Chapter 1 Introduction to JavaScript and the Web.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
CGS 3066: Web Programming and Design Spring 2016 Introduction to JavaScript.
JavaScript and AJAX 2nd Edition Tutorial 1 Programming with JavaScript.
XP Tutorial 10New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties.
CGS 3066: Web Programming and Design Spring 2017
Module 1 Introduction to JavaScript
Unit M Programming Web Pages with
Chapter 6 JavaScript: Introduction to Scripting
Tutorial 10 Programming with JavaScript
JavaScript is a programming language designed for Web pages.
Unit M Programming Web Pages with
Section 17.1 Section 17.2 Add an audio file using HTML
PHP (PHP: Hypertext Preprocessor)
Introduction to Scripting
4. Javascript Pemrograman Web I Program Studi Teknik Informatika
Introduction to JavaScript
Introduction to JavaScript
JavaScript an introduction.
WEB PROGRAMMING JavaScript.
Introduction to JavaScript
Tutorial 10 Programming with JavaScript
Computer communications
Introduction to JavaScript
Tutorial 10: Programming with javascript
JavaScript Basics What is JavaScript?
An Introduction to JavaScript
Introduction to JavaScript
Presentation transcript:

Introduction

 The scripting language most often used for client-side web development.  Influenced by many programming languages, easier for nonprogrammers to work with.  Best known for its use in website development.  Unrelated to Java programming -- although both have a common C syntax  Supports all the structured programming syntax in C, Java, C#. – variables, conditionals, repetition structures, data structures, classes

 Primary use is to write function that are embedded in HTML pages:  Examples:  popping up a new window with control over size, position, attributes.  Validation of web form input values to make sure they are acceptable before submitting to server.  Changing images as a mouse moves over them.  The JavaScript interpreter interprets JavaScript source code and execute the script accordingly.  not a compiled language like C or C++  Most common host environment for JavaScript is a web browser

 JavaScript is object based  Client side scripting – runs on browser, not on server  Don't need to send and retrieve data to the server  Saves time  Does not need to be compiled  Script interpretation done by browser

 To tell html you will be using JavaScript do this: ….  Everything between the opening and closing tags is JavaScript  Browser treats code as scripting language not html  Place inside head tag, the browser interprets first so the JavaScript will execute before the body

 If placed in tag, it gets run first  If placed in tag, runs in order it was placed  JavaScript can be placed in an external file  External JavaScript files end with.js extension

document.write(“hello world!"); alert(‘hello world’);  “hello world” is a character string - a string of characters contained between double or single quotes  parentheses following the name of the method containing the arguments that the method requires to perform its task.  Every statement should end with a semicolon (not required but a programming standard).  JavaScript is case sensitive  method write() – write a line of text

 Good practice to comment your code – explain what your code does  Comments – ignored by the browser  One line comment // This is a one line comment  Multi-line comment /* this is a multi-line comment I have a lot to explain */

 In Chrome – JavaScript Debugger is F12 or CTRL, shift J  In Firefox, use the error console (CTRL, Shift, J)  Provides clear description of errors  Identifies the line in your code where error occurred

 Fade in practice  chapter1 – 1.html