Professional Documents
Culture Documents
Learning Module Quarter 4 / Weeks 1-3 Computer 9: Junior High School SY 2020-2021
Learning Module Quarter 4 / Weeks 1-3 Computer 9: Junior High School SY 2020-2021
Learning Module Quarter 4 / Weeks 1-3 Computer 9: Junior High School SY 2020-2021
Learning Module
Quarter 4 / Weeks 1-3
Computer 9
The example above creates a form, having sampleform as the id. The values in the form will be sent to process.asp.
Do not worry about process.asp, you will learn more about it in the next chapters. Let us just focus on creating forms.
2|Page
B. Creating Form Elements
A form element is generally placed inside a form. A form element may be in the form of textboxes, textareas, buttons,
checkboxes, radio buttons, and drop-down boxes.
1. A textbox is used when asking a user to enter data in text format. It is defined using the <input> tag.
Syntax:
<input type=”text/password” size=”n” maxlength=”n” id=”objectedid” name=”name”
value=”initialvalue”>
Where:
type=”text” – it creates a textbox.
type=”password” – it creates a textbox with masking.
size – this is optional. It defines the width of the textbox by specifying the number of characters.
maxlength – this is optional. This indicates the number of characters the textbox will accept.
id – this is optional. This is the unique id of the object. The object id will be used to retrieve the values in the
object using the document.getElementByid () function.
name – this is the name of the object. The name is also used to retrieve the values in the object.
value – this is the initial value of the textboxes.
Example: Textboxes for Names Password
<html> <head> <html> <head>
<title>Sample Form</title> <title>Sample Form</title>
</head><body> </head><body>
<form name=”sampleform”> <form name=”sampleform”>
First Name: <input type=”text” name=”firstname” value=””><br> Password: <input type=”password” name=”magicword”
value=””>
Last Name: <input type=”text” name=”lastname” value=””> </form>
</form> </body></html>
</body></html>
Text area – is used to allow the user to enter data in multiple lines. A textarea is also called a multi-line textbox. A textarea is
defined using the <textarea> and </textarea> tags.
Syntax:
<textarea cols=”n” rows=”n” id=”objectid” name=”name”>text</textarea>
Where:
Cols – it specifies the number of columns in the textarea.
Rows – it specifies the number of rows in the textarea.
ID – this is optional. This is the unique id of the object. The object id will be used to retrieve the values in the object
using the document.getElementById( ) function.
Name – this is the name of the object. The name is also used to retrieve the values in the object.
Text – this is optional. This is the initial
content of the textarea.
Example:
<html>
<head>
<title> Sample Form </title>
</head>
<body>
<form name=”sampleform”>
Please say something about yourself.
<textarearows=”10” cols=”30” name=”additionalinfo”>
</textarea>
</form>
</body>
</html>
Button – or command button is the main clickable element in a form. A button is defined using the <input> tag.
Syntax:
<input type=” button/reset/submit” name=”name” value=” initialvalue”>
Where:
Type=” button” – it creates a button.
Type = “reset” – it creates a reset button. Reset buttons will change the value in each of the form elements back to its
original value when the form or page was loaded.
Type = “submit” – it creates a submit button. Clicking the submit button will send the values in the form to a file
specified in the action attributes of the <form> tag.
3|Page
Name – this is the name of the object. The name is
also used to retrieve the values in the object.
Value – this is the caption of the button.
Example:
<html>
<head>
<title>Sample Form</title>
</head>
<body>
<form name=”sampleform” action=”process.asp”>
First Name: <input type=”text” name=”firstname” value=””>
<br>
Last Name: <input type=”text” name=”lastname” value=””>
<br>
<input type=”reset” value=”Reset this form”>
<input type=”submit” value=”Submit this form”>
</form>
</body>
</html>
Generalization/Reflection:.
Application:
Do Activity#3: Application on your LAS.
4|Page
La Salette of Quezon, Inc. SY 2020-2021 Junior High School
COMPUTER 9
LEARNING ACTIVITY SHEET (LAS)
Quarter 1/Weeks 1-3
Name of Learner: __________________________________________ Section ________________________
Subject Teacher: __________________________________________ Date Submitted: _______________
Avtivity#1
Directions: Clip/Draw at least five (5) pictures of examples of using JavaScript Forms like the registration sample in your
module kit. Mount/Paste the items below and write a short reaction to each.
Items/Pictures Usage
Activity#2: Reflection
5|Page
You are now ready to apply important learning’s from lesson 1, the better way to strengthen the value of
plating food.
A. Write down your greatest concern about using JavaScript Forms.
1. ___________________________________________________________
2. ___________________________________________________________
3. ___________________________________________________________
B. What do you wish you have done? Use the stem, I wish, I could. Relate your answer to those in exercise A.
1. ___________________________________________________________
2. ___________________________________________________________
3. ___________________________________________________________
C. Write down your plan of action for the three concerns listed in A.
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
Activity#3: Application
List down all the four (4) codes of JavaScript Forms, and identify its uses.
Code Uses
-End of LAS-
6|Page