JAVA SCRIPT HOW TO PROGRAM DR. JOHN ABRAHAM PROFESSOR UTPA SOME SLIDES FROM W3SCHOOLS.

Slides:



Advertisements
Similar presentations
TECH 2018 (Week 16) Topic: JavaScript Parminder Kang Home: Phones Off Please.
Advertisements

The Web Warrior Guide to Web Design Technologies
Computer Science 103 Chapter 3 Introduction to JavaScript.
Multiple Tiers in Action
Inline, Internal, and External FIle
Introduction to JavaScript. Aim To enable you to write you first JavaScript.
آموزش طراحی وب سایت جلسه دهم – جاوا اسکریپت 1 تدریس طراحی وب برای اطلاعات بیشتر تماس بگیرید تاو شماره تماس: پست الکترونیک :
JQuery CS 268. What is jQuery? From their web site:
JavaScript CMPT 281. Outline Introduction to JavaScript Resources What is JavaScript? JavaScript in web pages.
JAVASCRIPT HOW TO PROGRAM -2 DR. JOHN P. ABRAHAM UTPA.
Introduction to JavaScript Dr. John P. Abraham University of Texas – Pan American.
JavaScript Defined DOM (Document Object Model) General Syntax Body vs. Head Variables Math & Logic Selection Functions & Events Loops Animation Getting.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Event Handlers CS101 Introduction to Computing. Learning Goals Learn about event handlers Determine how events are useful in JavaScript Discover where.
Internet Mark-up Languages CO32036 Part Lecture: Elementary JavaScript.
DOM and JavaScript Aryo Pinandito.
DHTML: Dynamic HTML Internet Technology1. What is DHTML? A collection of enhancements to HTML ► To create dynamic and interactive websites Combination.
Intro to JavaScript. Use the tag to tell the browser you are writing JavaScript.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
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)
Flash & JavaScript Mariela Hristova October 19, 2004 INF 385E – Fall 2004 – School of Information.
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 2: What is JavaScript?
Page Load © Copyright 2014, Fred McClurg All Rights Reserved.
Introduction.  The scripting language most often used for client-side web development.  Influenced by many programming languages, easier for nonprogrammers.
1 JavaScript
JavaScript Introduction.  JavaScript is a scripting language  A scripting language is a lightweight programming language  A JavaScript can be inserted.
COMP403 Web Design JAVA SCRİPTS Tolgay KARANFİLLER.
HTML JAVASCRIPT. CONTENTS Javascript Example NOSCRIPT Tag Advantages Summary Exercise.
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.
JavaScript Challenges Answers for challenges
CIS 375—Web App Dev II JavaScript I. 2 Introduction to DTD JavaScript is a scripting language developed by ________. A scripting language is a lightweight.
JavaScript Defined DOM (Document Object Model) General Syntax Body vs. Head Variables Math & Logic Selection Functions & Events Loops Animation Getting.
Pertemuan 5 IT133 Pengembangan Web JavaScript. What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting.
CIS 3.5 Lecture 2.3 "Introduction to JavaScript".
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 14 Key Concepts 1 Copyright © Terry Felke-Morris.
Introduction to JavaScript CSc 2320 Fall 2014 Disclaimer: All words, pictures are adopted from “Simple JavaScript”by Kevin Yank and Cameron Adams and also.
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.
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
Understanding JavaScript and Coding Essentials Lesson 8.
Chapter 5: Intro to Scripting CIS 275—Web Application Development for Business I.
JavaScript Events Java 4 Understanding Events Events add interactivity between the web page and the user You can think of an event as a trigger that.
Web Programming Java Script-Introduction. What is Javascript? JavaScript is a scripting language using for the Web. JavaScript is a programming language.
Week-12 (Lecture-1) Cascading Style Sheets (CSS): describe how documents are presented on screens. Types of Style Sheets: External Style Sheet - Define.
Using JavaScript to Show an Alert
>> JavaScript: Location, Functions and Objects
JavaScript is a programming language designed for Web pages.
JavaScript (JS) Basics
JavaScript Loops.
Web Development & Design Foundations with HTML5 7th Edition
JavaScript.
Introduction to JavaScript
JavaScript Introduction
DHTML Javascript Internet Technology.
Your 1st Programming Assignment
JavaScript: How To? B. Ramamurthy.
DHTML Javascript Internet Technology.
The Web Wizard’s Guide To JavaScript
Introduction to JavaScript
Tutorial 10 Programming with 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.
Tutorial 10: Programming with javascript
JavaScript Basics What is JavaScript?
JavaScript is a scripting language designed for Web pages by Netscape.
Introduction to Programming and JavaScript
The <script> Tag
JAVASCRIPT HOW TO PROGRAM -2
Presentation transcript:

JAVA SCRIPT HOW TO PROGRAM DR. JOHN ABRAHAM PROFESSOR UTPA SOME SLIDES FROM W3SCHOOLS

SCRIPT IN BODY OF HTML document.write("Hello World!");

FUNCTIONS IN THE HEADING function message() { alert("This alert box was called with the onload event"); } SEE NEXT SLIDE FOR RUN

PROGRAM RUN

Scripts in the head section: Scripts to be executed when they are called, or when an event is triggered, go in the head section. When you place a script in the head section, you will ensure that the script is loaded before anyone uses it.

Scripts in the body section: Scripts to be executed when the page loads go in the body section. When you place a script in the body section it generates the content of the page.

Using an External JavaScript Sometimes you might want to run the same JavaScript on several pages, without having to write the same script on every page. To simplify this, you can write a JavaScript in an external file. Save the external JavaScript file with a.js file extension.

Here is whole program that might help you with the assignment. Currency var rem, amt100, amt20, amt10, amt5, amt1, amt025, amt010, amt005, amt001; function convert_Currency() { var amt; amt = MyForm1.amount.value; amt100 = Math.floor(amt / 100); rem = amt % 100; amt20 = Math.floor(rem / 20); rem = rem % 20; amt10 = Math.floor(rem / 10); rem = rem % 10; amt5 = Math.floor(rem / 5); rem = rem % 5; amt1 = Math.floor(rem / 1); rem = rem % 1; amt025 = Math.floor(rem /.25); rem = rem %.25; amt010 = Math.floor(rem /.10); rem = rem %.10; amt005 = Math.floor(rem /.05); rem = rem %.05; amt001 = Math.floor(rem /.01); } function display_Currency() { convert_Currency(); MyForm1.amt100Frm.value = amt100; MyForm1.amt20Frm.value = amt20; MyForm1.amt10Frm.value = amt10; MyForm1.amt5Frm.value = amt5; MyForm1.amt1Frm.value = amt1; MyForm1.amt025Frm.value = amt025; MyForm1.amt010Frm.value = amt010; MyForm1.amt005Frm.value = amt005; MyForm1.amt001Frm.value = amt001; } $100 $20 $10 $5 $1 25 cents 10 cents 5 cents 1 cent