Skip to content

Latest commit

 

History

History
34 lines (30 loc) · 838 Bytes

ex_43.md

File metadata and controls

34 lines (30 loc) · 838 Bytes

Exercise 43

  • Create the following folder/file structure:
/ex_43
  |-- index.html
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Form Properties</title>
</head>
<body>
  <form action="save_user.html" method="post" enctype="application/x-www-form-urlencoded" name="login">
    <input type="text" id="username" name="username" />
    <input type="password" id="pass" name="pass" />
    <input type="submit" name="submit" value="Send" />
  </form>
  <div></div>
</body>
</html>

index.html

  • Create a basic HTML document
  • Create a script tag on the document head element
  • Select the form element using any of the JavaScript selectors
  • Crete a variable for each form property
  • Example define a action variable and assign the form action property
  • Show each form property value as div content