ICT Literacy Training-JavaScript Module
ICT Literacy Training-JavaScript Module
1. Introduction to Programming
2. Introduction to HTML
3. Document Organizer
4. Text Formatting
5. Using List
6. Image and Links
7. Tables
8. Introducing JavaScript
9. Displaying Messages
10.
HTML Tags & Escape Characters
11.
Data Types and Variables
12.
Expression and Operators
13.
Controlling the Program Flow
14.
Decision Making in JavaScript
15.
Using If/Else
16.
Using Nested If
17.
Switch Statement
18.
Using Loops
Introduction to HTML
The Web consists of a worldwide collection of electronic
documents. These electronic documents are called the web
pages. It can contain text, images, sounds, video and
hyperlinks.
Document Organizer
Information in the internet is displayed in different size to
identify the hierarchy of their importance.
Size
Paragraph
Text Formatting
The Web uses the RGB color model. Originally HTML uses
256 colors; however, there was a problem in consistency in
which these colors are displayed from one computer system
to another, from one monitor to another.
Web Safe Color
6 digit- Hexadecimal
#FF FF FF
Bold
Underline
Italic
Font
Using List
Order List
Start
Type
Under List
Type
Definition List
Definition Term
Definition Definition
Image
Source
Three Types of Link
Bookmark
Local link
External link
a href , a name
JavaScript
JavaScript is a programming language that you can
use to add interactivity to your Web pages. It lets you
create an active user interface, giving the user the
feedback as they navigate your web page. It can also
use to validate entries in your forms. JavaScript refers
to the programming languages that create programs
executed by an interpreter within the Web browser.
String
Number
Boolean
Null
Variables
Arithmetic Operators
Arithmetic operators are used to perform mathematical
calculations, such as addition, subtraction, multiplication
and division.
String operator
(+)
Data Conversion Commands
parseFloat()
parseInt()
toUpperCase()
toLowerCase()
Comparison Operators
Comparison Operators are used to compare two operands
for equality and to determine if one number value is
greater than the other. A Boolean value of true or false is
returned after two operands are compared.
Opera
tor
==
!=
>
<
>=
<=
Exampl
e
A=3,
B=8
A==B
A!=B
A>B
A<B
A>=B
A<=B
Result
False
True
False
True
False
True
Activities:
1. Create s that will display your name and the grade
level handle and the document will have a red
background color.
2. Create an activity that will display and format the
name of your school wherein the text format must
bold, italic and underline
3. Using order list: create a document that will display
all the grade and sections that you handle. The listing
of the item will start at 5.
4. Create an html file that will display the image that
youve edited during your Photoshop training (Basic
Photoshop) alignment must be at the right side.
5. Using the prompt () function in JavaScript, create a
document that will accept the name of the user and
ask for the background color of the document.
6. Create a JavaScript program that will allow the user
to enter their name in any case, program will
automatically display it all in UPPERCASE.
7. Create a JavaScript document that will accept two
integer numbers and will display the following: SUM,
DIFFERENCE, PRODUCT and QUOTIENT.
8. Create a JavaScript document that will allow the user
to enter a number, the program will determine if the
entered value is ODD or EVEN. (If the entered number
is ODD number use alert function to display the result
else use document writeln().
9. Using the Do While statement, create a JavaScript
program will accept an integer value and will display
the number in a decrement way
10.
Create a program that will accept the grade of
student in every quarter and your program will
compute for the average and determine if the grade
is fail or pass.