0% found this document useful (0 votes)
203 views22 pages

JAVASCRIPT

This document provides an overview of JavaScript chapter 5, which covers browser detection, cookies, date and time objects, and timing functions. It defines cookies as small amounts of information stored on a user's computer from a webpage. It demonstrates how to use the date object to manipulate and access current dates and times. It also covers the setTimeout and clearTimeout functions for JavaScript timing. The document concludes with examples of applying these concepts in a web page and an evaluation quiz.

Uploaded by

shaales
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
203 views22 pages

JAVASCRIPT

This document provides an overview of JavaScript chapter 5, which covers browser detection, cookies, date and time objects, and timing functions. It defines cookies as small amounts of information stored on a user's computer from a webpage. It demonstrates how to use the date object to manipulate and access current dates and times. It also covers the setTimeout and clearTimeout functions for JavaScript timing. The document concludes with examples of applying these concepts in a web page and an evaluation quiz.

Uploaded by

shaales
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

JavaScript

Chapter 5
PRAYER
LET’S PLAY!

WHO WANTS TO
BE A MILLIONAI
RE?
IDENTIFY THE NAMES OF THE
DIFFERENT WEB BROWSERS.
OBJECTIVES:

1.define what cookies is;


2.determine how to use the date
object; and
3.show appreciation on the
function of date objects and
time stamps.
Browser Detection
and Cookies, Date
and Time Objects

Lesson 6
COOKIES?

• Cookies are small amount of


information that are stored in
the user’s computer from a
webpage. They can be accessed
and retrieved by the webpage
whenever they are needed.
How to clear browsers data?

1. On your Android phone or tablet, open the Chrome


App.
2. Tap more > Settings
3. Under “Advanced,” tap Privacy > Clear browsing data.
4. Choose a time range, like Last Hour or All Time.
5. Select the types of information you want to remove.
6. Tap Clear Data
Date Object

It is used to manipulate and access current


dates and times.

var varname = new Date ();


Syntax for the date object
Example using the date object

var myDate=new Date(“Feb. 21,


202);
Another method of declaring date

myDate = new Date ();


newDate1 = (myDate.getMonth() + 1) + “/”;
newDate2 = myDate.getDate() + “/”;
newDate3 = myDate.getFullYear();
Today = newDate1 +newDate2 + newDate3;
JavaScript Timing

 setTimeout ()
 clearTimeout ()
setTimeout ()
setTimeout () output
clearTimeout ()
clearTimeout () output
APPLICATION
• Create a different web page for set timeout and
clear timeout.
• Add designs.
• Output will be graded based on the following
performance rating:
PERFORMANCE RATING 3 2 1 SCORE
1. Did you use the proper background
for you website?
2. Did you use such elements to add a
touch of motion to your site
3. Did you make your webpage easily
scannable?
4. Did you make your website
responsive?
5. Did you check your website for
errors?
TOTAL
EVALUATION
TRUE OR FALSE.
1. JavaScript’s official name is AACMA.
2. Cookies are small amount of information that is
stored in the user’s computer from a web page.
3. JavaScript is case-sensitive.
4. JavaScript works like Java.
5. You cannot mix JavaScript codes with HMTL tag
properties.
ANSWERS
1. FALSE
2. TRUE
3. TRUE
4. FALSE
5. FALSE
AGREEMENT
1. Create a slideshow that will change every 3
seconds.
References: https://
www.youtube.com/watch?v=iOXHFvFpimg
2. Reinforcement: Create a webpage using
JavaScript. Add background color or background
image.
3. Advanced: Study the next lesson: Browser
detection, cookies, and error
»Guide Question: What is error?

You might also like