PHP Classes

File: screenshots/js/obtainInputValuesByClassNameUseCase.html

Recommend this page to a friend!
  Classes of bamigboye biodun   Logical Functions   screenshots/js/obtainInputValuesByClassNameUseCase.html   Download  
File: screenshots/js/obtainInputValuesByClassNameUseCase.html
Role: Auxiliary data
Content type: text/plain
Description: Example HTML page
Class: Logical Functions
General-purpose PHP and JavaScript functions
Author: By
Last change:
Date: 1 year ago
Size: 926 bytes
 

Contents

Class file image Download
<!DOCTYPE html> <html lang="en"> <head> <title> Obatin Multiple form inputs by ClassName </title> </head> <body> <h1>Function USe Case</h1> <form class="user-form"> <input type="text" class="input-field" id="firstName" value="Biodun"> <input type="text" class="input-field" id="lastName" value="Bamigboye"> <input type="email" class="input-field" id="email" value="biodunbamigboye@eportalnet.com"> <button type="submit">Submit</button> </form> </body> </html> <script src="obtainInputValuesByClassName.js"></script> <script> document.querySelector('.user-form').addEventListener('submit', (e) => { e.preventDefault(); formValues = obtainInputValuesByClassName('input-field'); console.log(formValues) return formValues; }) // Return Value : ['Biodun','Bamigboye','biodunbamigboye@eportalnet.com'] </script>