Lesson 14. <!-- function Addit() { var num1=document.Calform.One.value; var num2=document.Calform.Two.value; document.write("The result of this addition.

Slides:



Advertisements
Similar presentations
1 Pertemuan 14 PHP: Conditions-loops-functions-Array Last Updated: 23 rd May 2011 By M. Arief
Advertisements

Tonight’s JavaScript Topics 1 Conditional Statements: if and switch The Array Object Looping Statements: for, while and do-while.
EIW: Javascript the Language1 The JavaScript Language.
1 The Information School of the University of Washington Oct 30fit review Programming Review INFO/CSE 100, Fall 2006 Fluency in Information Technology.
25 October Conditionals and Loops. Presentations Brendan: Cyberwarfare Casey: Online shopping (No current event today)
CIS101 Introduction to Computing Week 10 Spring 2004.
CIS101 Introduction to Computing Week 10. Agenda Your questions Final exam and final project CIS101 Student Survey Class presentations: Your Mad Libs.
(BASIC MATH) QUIZ. START!! Click Here!! 1. What is Addition? a. The act or process of adding numbers. The act or process of adding numbers. b. The act.
Addition & Subtraction Add Plus More than Subtract Difference Take away Altogether Minus Less than +-
Introduction to JavaScript for Python Programmers
Lesson15. JavaScript Objects Objects encapsulate data (properties) and behavior(methods); the properties and the methods of an object are tied together.
1 CS101 Introduction to Computing Lecture 35 Mathematical Methods (Web Development Lecture 12)
JAVASCRIPT HOW TO PROGRAM -2 DR. JOHN P. ABRAHAM UTPA.
Javascript Training Introduction to Javscript2 Hours Variables1 Hour Operators1 Hour Statements1 Hour Loops2 Hour Functions2 Hour Arrays1 Hour Total10.
Using Object-Oriented JavaScript CST 200- JavaScript 4 –
Lesson 4-4: Arithmetic and Geometric Sequences
NMED 3850 A Advanced Online Design January 26, 2010 V. Mahadevan.
JavaScript Part 1.
Arrays – What is it? – Creation – Changing the contents Functions – What is it? – Syntax – How they work – Anonymous functions A quick lesson in Objects.
CIS 375—Web App Dev II JavaScript II.
CHAPTER 4 Java Script อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
Introduction to JavaScript Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan. 1.
Topic: An Introduction to JavaScript - from Beginning JavaScript by Wilton (WROX)
Objects.  Java Script is an OOP Language  So it allows you to make your own objects and make your own variable types  I will not be going over how.
20-753: Fundamentals of Web Programming 1 Lecture 12: Javascript I Fundamentals of Web Programming Lecture 12: Introduction to Javascript.
CS-3432 Electronic Commerce Lecture – 13 Sikandar Shujah Toor
Java Script User Defined Functions. Java Script  You can define your own JavaScript functions. Such functions are called user- defined, as opposed to.
Logic and Control. 4-2 Decision (selection) structure: if (condition) { statement etc. } Example: if (age == 15) { document.write(“ you are a fifteen”);
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
Creating Web Documents catch-up JavaScript slide show tools redirection.
Introduction to ASP.NET Please use speaker notes for additional information!
Chapter 10: JavaScript Functions CIS 275—Web Application Development for Business I.
Loops Robin Burke IT 130. Outline Announcement: Homework #6 Conditionals (review) Iteration while loop while with counter for loops.
ECA 225 Applied Interactive Programming ECA 225 Applied Online Programming control structures, events, objects.
Jaana Holvikivi 1 Introduction to Javascript Jaana Holvikivi Metropolia.
CSCE 102 – Chapter 11 (Performing Calculations) CSCE General Applications Programming Benito Mendoza Benito Mendoza 1 By Benito Mendoza.
JavaScript 101 Lesson 3: Variables and Arithmetic.
Creating Web Documents: JavaScript Ftp / file management: review Introduction to JavaScript Sources Homework: start review for midterm, work on Project.
IS2802 Introduction to Multimedia Applications for Business Lecture 4: JavaScript, Loops, and Conditional Statements Rob Gleasure
Language Find the latest version of this document at
Scripting with Client-Side Processing Scripting with Client Side Processing Lesson – Web Technologies Copyright © Texas Education Agency, All rights.
Chapter 9: Control Statements II CIS 275—Web Application Development for Business I.
Warm Up Problem of the Day Lesson Presentation Lesson Quizzes.
Warm Up Evaluate • 4 • 4 • b2 for b = 4 16
XP Tutorial 3 New Perspectives on JavaScript, Comprehensive1 Working with Arrays, Loops, and Conditional Statements Creating a Monthly Calendar.
ECA 225 Applied Interactive Programming ECA 225 Applied Online Programming javascript arrays.
JavaScript and Ajax (JavaScript Functions) Week 5 Web site:
Arrays and Loops. Learning Objectives By the end of this lecture, you should be able to: – Understand what a loop is – Appreciate the need for loops and.
JavaScript JavaScript ( Condition and Loops ). Conditional Statements If Statement If...else Statement if (condition) { code to be executed if condition.
JavaScript Tutorial. What is JavaScript JavaScript is the programming language of HTML and the Web Programming makes computers do what you want them to.
Chapter 9. An event-driven, object-based programming language that provides various types of functionality to pages. Object based: it is a language that.
Unit B2 Day 6 This unit lasts for 3 weeks. 5B2 I can investigate a general statement and say whether examples are true or false I can split a word problem.
Intro to Math… Lesson 1. 4 Fundamental Operations Of Math Example: adding + subtracting - multiplying x dividing ÷
>> Introduction to JavaScript
HTML & teh internets.
Javascript Example
To Do: 1.Math Boxes Math Boxes Math Boxes Math Boxes Math Boxes Math Boxes Any Unit 1 MB or pages not Not Done.
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Unit B2 Day 5 This unit lasts for 3 weeks.
Unit B2 Day 3 This unit lasts for 3 weeks.
Algebra 150 Unit: Functions Lesson Plan #8a: Negative Numbers (Reteach) Objective SWBT add, subtract, multiply and divide negative integers (whole numbers).
Objectives By the end of the lesson students will:
Algorithms Take a look at the worksheet. What do we already know, and what will we have to learn in this term?
Solving Two-Step Equations Lesson 2-2 Learning goal.
Divide the number in C by 10.
DO NOW Copy down your homework: NONE (this is rare – don’t get used to it!!) Warm-up: Write down some rules you remember about how to add, subtract,
Using Built In Objects Kevin Harville.
Web Programming and Design
Did a few weeks ago. tag would work..
Presentation transcript:

Lesson 14

<!-- function Addit() { var num1=document.Calform.One.value; var num2=document.Calform.Two.value; document.write("The result of this addition is " + (parseFloat(num1)+parseFloat(num2))); } function minus() { var num1=document.Calform.One.value; var num2=document.Calform.Two.value; document.write("The result of this subtraction is " + (parseFloat(num1)-parseFloat(num2))); } //--> First Number: Second Number:

<!-- function Multiplyit() { var num1=document.Calform.One.value; var num2=document.Calform.Two.value; alert(parseFloat(num1)*parseFloat(num2)); } function Divideit() { var num1=document.Calform.One.value; var num2=document.Calform.Two.value; alert(parseFloat(num1)/parseFloat(num2)); } //--> Multiply and Divide Calculator First Number: Second Number:

A Drop-Down List of Links <!-- function GoToIt(list) { var selection = list.options[list.selectedIndex].value if (selection != "None") location.href = selection } //--> Select a page previously done ---> Calculator Style Sheet Web Forms Table Margins Frames

<!-- function minus() { var num1=document.Calform.One.value; var num2=document.Calform.Two.value; if(parseFloat(num1)<parseFloat(num2)) {alert("negative"); } else { alert(parseFloat(num1)-parseFloat(num2)); } //--> First Number: Second Number:

Loops For loop for(intialization;condition;increment) {statements} While loop while(codition){statements} Do while loop do{statements}while(condition) Keep on executing a code till a certain condition is met.

For Loop Using the For Statement <!-- for(i=1;i<7;i++) document.write(" Hello "+i+"!! "); //->

Some Predefined Objects Global Array String Math Date … etc.

Example of Math object Using the Math object Using the Math object <!-- document.write("Math.PI :" +Math.PI +" "); document.write("Math.LN2 :"+Math.LN2+" "); document.write("Math.sin(90) :"+Math.sin(90)+" "); document.write("Math.random() :"+Math.random()+" "); document.write("Math.pow(2,3) :"+Math.pow(2,3)+" "); document.write("Math.min(123,133): "+Math.min(123,133)+" "); //-->

Array Object Using Arrays Using Arrays <!-- myArray=[0,1,2,3,4,5,6,7,8,9,10]; document.write("myArray: first element " +myArray[0]+" "); document.write("myArray.toString(): "+myArray.toString()+" "); document.write("myArray.join(':'): "+myArray.join(':')+" "); document.write("myArray.reverse(): "+myArray.reverse()+" "); document.write("myArray.sort(): "+myArray.sort()+" "); //-->