It is a simple application responsible for calculating BMI (Body Mass Index). Some basic javaScript concepts have been applied in this example:
- Variables and Operators;
- Arrays, Loops and Styles;
- Events, Forms and Elements;
- Good practices with javaScript;
- Form validation;
- Delegation;
- Filter a table using regular expression;
- Retrieve records with AJAX.
Open the file index.html
. It contains four operations:
- Add new patient: Fill patient information and click the
Add
button; - Remove patient: Double-click on the line corresponding to the patient that should be removed;
- Retrieve patients from another service: Click the
Retrieve Patients
button; - Filter patients: Enter the patient's name in the filter field.