There are many types of HTML form elements for different types of data that can be added or selected by the user.
- See the HTML tutorials: Forms and Input, and New Form elements and attributes in HTML5.


Accessing elements of <form> in JavaScript

There are several ways to access elements of a <form> in JavaScript.
Generally, these methods are used: getElementById(), querySelector(), the syntax: eform['elm_name'], or the eform.elements[index] property.



Forms elements have specific properties and methods that can be used in JavaScript to interact with the user.
- There is a list with useful properties and methods of the elements from <form> at the page:
coursesweb.net/javascript/properties-methods-form-elements

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which tag can be used to create input text field in web page?
<form> <input> <div>
<input type="text" name="a_name" value="val" />
Which CSS property displays the text in a small-caps font?
display font-variant font-style
h3 {
  font-variant: small-caps;
}
What instruction displays a notice box with a message inside it, in JavaScript?
for() Date() alert()
var msg = "Visit CoursesWeb.net";
alert(msg);
Indicate the PHP code used to get the users IP.
$_SERVER["HTTP_USER_AGENT"] $_SERVER["REMOTE_ADDR"] $_GET[]
$ip = $_SERVER["REMOTE_ADDR"];
echo $ip;
Accessing form fields

Last accessed pages

  1. Create simple Website with PHP (27026)
  2. Contact page - CoursesWeb (40195)
  3. Mysql SELECT JOIN tables on two different Databases (1075)
  4. Node.js Move and Copy Directory (7235)
  5. Tabs effect with CSS (40807)

Popular pages this month

  1. Making DIV Contents Scroll Horizontally, with multiple Div`s inside (2976)
  2. Contact page - CoursesWeb (2867)
  3. Tabs effect with CSS (2849)
  4. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (1040)
  5. PHP getElementById and getElementsByTagName (998)