Upload
jhun-estimada
View
214
Download
0
Embed Size (px)
Citation preview
7/28/2019 jvscript free
1/13
Prepared by: Glodelyn D. Ocfemia
COM153 Active Scripting
7/28/2019 jvscript free
2/13
Course Objectives
At the end of the course, students should
be able to:
Understand what JavaScript can and
cannot do
Understand where JavaScript fits within awebpage.
Apply by developing webpages using
javascript programming
7/28/2019 jvscript free
3/13
Orientation
Tell something about SELF
Classroom policies,
Grading system Library Visits
7/28/2019 jvscript free
4/13
Classroom ground
rules1.Attendance and Attire2.Three-second rule
3.Class Preparation
4.Class Participation
5.Meeting Deadlines
6.Cheating and Plagiarism7.Cell phones, laptops, etc
8.Responsibility for classes missed
9.No special quizzes or machine
7/28/2019 jvscript free
5/13
Grading System
AttendanceQuizzes
Laboratory Exercises
Seatwork
Recitation
Assignments
Major Exams
Final Project
7/28/2019 jvscript free
6/13
Library Visits
Ice breaker
1. Think of a number from 1 to 10Multiply that
number by 9 If the number is a 2-digit number,
add the digits togetherNow subtract 5Determine
which letter in the alphabet corresponds to the
number you ended up with (example: 1=a, 2=b,
3=c,etc.)
2. Think of a country that starts with that letter
Remember the last letter of the name of that
country
3. Think of the name of an animal that starts with
that letter.Remember the last letter in the nameof that animal
7/28/2019 jvscript free
7/13
Session Objectives
At the end of this session, students should be
able to:
understand the history of JavaScript
differentiate JavaScript between Java list of what is it used of JavaScript today
understand what JavaScript can and cannot
do. demonstrate the simple code in JavaScript
7/28/2019 jvscript free
8/13
Differences between the Java and
JavaScript
Java is an OOP programming
language while Java Script is an OOP
scripting language. Java creates applications that run in a
virtual machine or browser while
JavaScript code is run on a browseronly.
Java code needs to be compiled while
JavaScript code are all in text.
7/28/2019 jvscript free
9/13
Introduction of JavaScript
NOT Java
JavaScript was developed by
Netscape
- developed by Brendan Eich
Java was developed by Sun
Designed to plug a gap in the
techniques available for creating web-
pages
Client-side dynamic content
7/28/2019 jvscript free
10/13
What is it used for today? Handling User Interaction
Doing small calculations
Checking for accuracy and appropriateness of data
entry from
forms Doing small calculations/manipulations of forms input
data
Search a small databased embedded in the
downloaded page
Save data as cookie so it is there upon visiting the
page
Generating Dynamic HTML documents
7/28/2019 jvscript free
11/13
javascript:alert("Hello World");
7/28/2019 jvscript free
12/13
How to enable Javascript
Internet Explorer for Windows Go to the 'Tools' menu and choose 'Internet Options'.
Next, click the 'Security' tab. Make sure the 'Internet Zone' is highlighted andpress the 'Custom Level' button to open the security options.
Look for the entry near the bottom of the list which says 'Scripting', then 'ActiveScripting' and make sure it is enabled.
Safari for Mac
Go to the Safari menu and choose 'Preferences'.
Click on the 'Security' button and ensure that the 'Enable JavaScript' option isticked.
Firefox
Firefox users should go to the 'Tools' menu and select 'Options'.
Next click 'Web Features'. Check 'Enable Javascript' in the main panel and press
OK. .DOM Document Object Model - defines the DOM as a platform- and
language-neutral interface that allows programs and scripts to dynamicallyaccess and update the content, structure, and style of documents.What thismeans for you is that you can work with a specification to which webbrowsersadhere to develop a webpage in a dynamic manner. The DOM createsa tree structure forHTML and Extensible Markup Language (XML) documentsand enables scripting of thoseobjects.
7/28/2019 jvscript free
13/13
Assignment
Create your own webpages using HTML due nextmeeting