 Inside attributes like onclick  As a section of code in the body  Only special cases  As a function in a separate file  Can link to it like the.

Slides:



Advertisements
Similar presentations
Working with Forms. how are forms manipulated? the document object contains an array of forms objects, one for each form, in document order –forms[] any.
Advertisements

HTML 5 and CSS 3, Illustrated Complete Unit L: Programming Web Pages with JavaScript.
The Web Warrior Guide to Web Design Technologies
JavaScript 101 Lesson 5: Introduction to Events. Lesson Topics Event driven programming Events and event handlers The onClick event handler for hyperlinks.
Forms and JavaScript CS105. Introduction We want to write an html page for a Pizza shop for getting order from customers online.
JAVASCRIPT TIPS. REMEMBER JAVASCRIPT IS VERY, VERY CASE SENSITIVE.
Inline, Internal, and External FIle
Lesson15. JavaScript Objects Objects encapsulate data (properties) and behavior(methods); the properties and the methods of an object are tied together.
WaveMaker Visual AJAX Studio 4.0 Training Troubleshooting.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
DHTML: Dynamic HTML Internet Technology1. What is DHTML? A collection of enhancements to HTML ► To create dynamic and interactive websites Combination.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
1 Functions Lecfture Abstraction abstraction is the process of ignoring minutiae and focusing on the big picture in modern life, we are constantly.
JavaScript, jQuery, and Mashups Incorporating JavaScript, jQuery, and other Mashups into existing pages.
Forms Collecting Data CSS Class 5. Forms Create a form Add text box Add labels Add check boxes and radio buttons Build a drop-down list Group drop-down.
JavaScript, Fourth Edition
DYNAMIC HTML What is Dynamic HTML: HTML code that allow you to change/ specify the style of your web pages. Example: specify style sheet, object model.
DOCUMENTATION SECTION GLOBAL DECLARATION SECTION
JavaScript. JavaScript is the programming language of HTML and the Web. Easy to learn One of the 3 languages of all developers MUST learn: 1. HTML to.
Active X – Mouse Events. Structured Graphics Control  Included in Internet Explorer v5.0  Add to page with the OBJECT tag  Accessible via scripting.
1 CSC160 Chapter 7: Events and Event Handlers. 2 Outline Event and event handlers onClick event handler onMouseOver event handler onMouseOut event handler.
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.
USING JAVASCRIPT TO SHOW AN ALERT Web Design Sec 6-2 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
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.
HTML tags and attributes By: Dennis Champagne. List of tags.
Review of HTML and CSS A (very) brief review of some key fundamentals to be aware of in IT-238.
JavaScript Functions. CSS Inheritance Which formatting applies? x y z input { display: block; } input.pref { background:red; } If you have a selector.
Understanding JavaScript and Coding Essentials Lesson 8.
Introduction to Javascript. What is javascript?  The most popular web scripting language in the world  Used to produce rich thin client web applications.
JavaScript and Ajax (JavaScript Environment) Week 6 Web site:
 Create a free account  Verify your address.
HTML Tutorial. What is HTML HTML is a markup language for describing web documents (web pages) HTML documents are described by HTML tags Each HTML tag.
Today… Modularity, or Writing Functions. Winter 2016CISC101 - Prof. McLeod1.
Introduction to HTML Hypertext Mark-up Language. HTML HTML = Hypertext Mark-up Language Is just plain simple text marked up by “tags” You can create a.
Web Programming Java Script-Introduction. What is Javascript? JavaScript is a scripting language using for the Web. JavaScript is a programming language.
JavaScript, Third Edition 1 SELECTION LIST Demo. JavaScript, Third Edition 2 Description This web page will edit the slection to ensure an option was.
 Collection of statements that can be invoked as a unit  Can take parameters  Can be used multiple times  Can call without knowing what they do or.
Week-12 (Lecture-1) Cascading Style Sheets (CSS): describe how documents are presented on screens. Types of Style Sheets: External Style Sheet - Define.
Javascript and Dynamic Web Pages: Client Side Processing
Using JavaScript to Show an Alert
JavaScript functions.
Intro to JavaScript CS 1150 Spring 2017.
Intro to Web Development Class A Review
Intro to CSS CS 1150 Fall 2016.
INTRODUCTION TO HTML5.
JavaScript Client-side
JavaScript Part 2 Organizing JavaScript Code into Functions
Website Design 3
Intro to CSS CS 1150 Spring 2017.
JavaScript an introduction.
DHTML Javascript Internet Technology.
Console.
Javascript: variables and parameters
JavaScript Functions.
JavaScript – Part I Mendelsohn.
Introduction to JavaScript
DHTML Javascript Internet Technology.
Reviewing key concepts
Javascript.
For this assignment, copy and past the XHTML to a notepad file with the .html extension. Then add the code I ask for to complete the problems.
CSS.
Computer communications
Functions.
Introduction to Programming and JavaScript
JavaScript functions.
Introduction to JavaScript
6.1 Introduction 6.2 Positioning Elements
Introduction to Web programming
Presentation transcript:

 Inside attributes like onclick  As a section of code in the body  Only special cases  As a function in a separate file  Can link to it like the css  We will use

 Collection of statements that can be invoked as a unit  Can take parameters  Can be used multiple times  Can call without knowing what they do or how

function name() { stmt; }

Myscript.js JavaScript option in komodo note that it’s an empty file but it can help you do NOT include the script tag

function name(parm) { stmt; }

 Name is a placeholder  Can be used anywhere in a function  Can be used as many times as you want  Can not change it  MUST supply value when call  Can be different everytime

HTMLJS mypet(‘cow’); mypet(‘dog’); function mypet(pet) { alert(‘my pet: ‘+pet); }

 Order matters  Need different names

HTMLJS mypet(‘Mutt’,’Jeff’); mypet(‘Jeff’,’Mutt’); function taller(big,small) { alert (big+’ is taller than ‘+ small); }

 Jsbin is just like jsfiddle but it allows you to see the console  Console.log( message );