diff options
author | itchief <alex.malcev1980@gmail.com> | 2022-03-21 13:48:35 +0300 |
---|---|---|
committer | itchief <alex.malcev1980@gmail.com> | 2022-03-21 13:48:35 +0300 |
commit | 125b07aff9d2dfd69374e55944d3502f4cd3e43a (patch) | |
tree | c1b3580a5b42e203db261d8b2438233ea026f68c | |
parent | 4830729817e4d90736d989a6cddcfc8afd1e679e (diff) |
Update
-rw-r--r-- | README.md | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -12,17 +12,16 @@ Screenshots: ![](https://itchief.ru/assets/images/350/3.png) ## Step-by-step instructions -1. Add a form to the HTML (it allows us to collect data). -An example of the form is located in "index.html". + +### 1. Add form in HTML ```html <form id="form" action="/feedback/processing.php" enctype="multipart/form-data" novalidate> ... </form> ``` -The handler is set using the action attribute. -An example of the form is located in "index.html". +An example of the form is given in "index.html". -2. Connect the files "style.css" and "form-processing.js": +### 2. Include files in HTML: ```html <link rel="stylesheet" href="css/style.css"> <script src="/feedback/js/form-processing.js"></script> @@ -50,7 +49,7 @@ document.querySelector('.form-success__btn').addEventListener('click', (e) => { ``` The `reset()` method resets the form. -3. Initialize the form as `ItcSubmitForm`: +### 3. Initialize form as `ItcSubmitForm` ```js // 'form' - selector const form = new ItcSubmitForm('form'); |