This code demonstrates the implementation of a multi-level dropdown menu and a simple submit form using HTML, CSS, and JavaScript. The multi-level dropdown allows users to select options from multiple levels, such as selecting a province, city, and district, while the simple submit form captures user input and performs basic validation before submitting the form.
- HTML
- CSS
- JavaScript
- Clone the repository or download the source code.
- Open the
index.htmlfile in a web browser.
The multi-level dropdown allows users to select options from different levels, such as provinces, cities, and districts. The dropdowns are populated dynamically using JavaScript based on the user's selection.
- Dropdown Levels:
- Province: Select the desired province from the dropdown.
- City: Once a province is selected, the dropdown will populate with cities related to that province.
- District: After selecting a city, the dropdown will display districts within the selected city.
The simple submit form captures user input and performs basic validation before submitting the form.
-
Form Fields:
- Email: Enter your email address.
- Message: Provide a message.
- Submit Button: Click to submit the form.
-
Form Validation:
- The email field is required and must be in a valid email format.
- The message field is required and must be at least 10 characters long.
- You can customize the dropdown options and behavior by modifying the JavaScript code in the
script.jsfile. - To change the form fields or add additional form fields, modify the HTML code in the
index.htmlfile. - Update the CSS styles in the
styles.cssfile to customize the appearance of the dropdown and form.
This project is licensed under the MIT License.