Working with Forms and Window Objects Part 2
Already have an account? Sign In »
Welcome to the Working with Forms and Window Objects - Part 2 Practice Lab. In this module, you will be provided with the instructions and devices needed to develop your hands-on skills.
In this module, you will complete the following exercise:
- Exercise 1 - Validating Forms
After completing this lab, you will be able to:
- Set, get, and reset the values of form elements
- Validate form elements using HTML input attributes and onsubmit event
The following exam objectives are covered in this lab:
- 1.5 Complete and debug code that interacts with the Browser Object Model (BOM)
- 5.1 Complete and debug code that retrieves input from forms and sets form field values
- 5.2 Complete and debug code that performs input validation
- 5.3 Describe the form submission process
It will take approximately 25 minutes to complete this lab.
Exercise 1 - Validating Forms
You can have validation checks enabled for the form elements. At run-time, the data entered in the form elements can be validated against certain conditions. This will ensure accuracy in the form inputs. This will also result in accurate data submission to the web server. You can use the built-in Window object methods such as prompt() and confirm() to accept inputs at run-time and confirm the form data submission process respectively.
In this exercise, you will learn how to validate form elements using HTML input attributes and onsubmit event. You will perform the following tasks:
- Task 1 - You will download the Visual Studio Code workspace (Forms) from the Intranet and open the HTML page named Register.html in the Forms workspace.
IT & Cybersecurity certification hands on practice labs and practice exams for certifications and skill development.
See the full benefits of our immersive learning experience with interactive courses and guided career paths.