Академический Документы
Профессиональный Документы
Культура Документы
OBJECTIVE:
To learn and practice designing forms and listing in HTML.
DESCRIPTION
FORMS IN HTML
These are some basic form fields that you will most likely create in a web form. They are created in HTML with the
help of <form> and <input> tags in HTML.
A radio button
A checkbox
A drop-down list
A Button
The first step when creating a web form is to identify the form method and the location of the script or utility that makes it
work. Although books written on HTML design may include a form method of "GET" as well as "POST," we use the POST
method.
To identify the form method and script location, type:
<SELECT NAME="name">
< OPTION SELECTED >option one
< OPTION>option two
< /SELECT>
ACTIVITY
1. Create a small online survey with four questions of your own. Your survey should first collect the participants
details (name, address, gender, D.O.B., a password etc), followed by four questions to answer.
Ensure that your survey includes:
1. Simple text inputs
2. A password input.
3. Select drop-down boxes (for State, or within your questions).
4. Radio buttons and checkboxes (as part of your form design).
5. A large text area for comments at the end.
6. A submit button with your own text (such as "Send Survey")
7. A reset button.
JAVASCRIPT
<!DOCTYPE html>
<html>
<head>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Paragraph changed.";
}
</script>
</head>
<body>
<h1>A Web Page</h1>
<p id="demo">A Paragraph</p>
<button type="button" onclick="myFunction()">Try it</button>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<p>In this case JavaScript changes the value of the src (source) attribute of an image.</p>
</body>
</html>