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 adds an image in web page?
<div> <img> <span>
<img src="http://coursesweb.net/imgs/webcourses.gif" width="191" height="63" alt="Courses-Web" />
Which of these CSS codes displays the text oblique?
font-style: italic; text-decoration: underline; font-weight: 500;
#id {
  font-style: italic;
}
Click on the jQuery function used to hide with animation a HTML element.
click() hide() show()
$(document).ready(function() {
  $(".a_class").click(function(){ $(this).hide("slow"); });
});
Click on the correctly defined function in PHP.
fname function() {} function fname() {} function $fname() {};
function fname($a, $b) {
  echo $a * $b;
}
Accessing form fields

Last accessed pages

  1. OOP - Constants, Static Properties and Methods (4810)
  2. Contact page - CoursesWeb (14263)
  3. Tabs effect with CSS (14956)
  4. Making DIV Contents Scroll Horizontally, with multiple Div`s inside (21004)
  5. SHA512 Encrypt hash in JavaScript (13044)

Popular pages this month

  1. Making DIV Contents Scroll Horizontally, with multiple Div`s inside (2330)
  2. Contact page - CoursesWeb (2239)
  3. Tabs effect with CSS (2237)
  4. Insert, Select and Update NULL value in MySQL (994)
  5. PHP getElementById and getElementsByTagName (899)