Javascript Course

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:

Daily Test with Code Example

Which tag is used in <table> to create table header cell?
<thead> <th> <td>
  <th>Title 1</th>
  <th>Title 2</th>
Which CSS property sets the distance between lines?
line-height word-spacing margin
.some_class {
  line-height: 150%;
Which function opens a new browser window.
alert() confirm() open()
document.getElementById("id_button").onclick = function(){"");
Indicate the PHP function that returns an array with names of the files and folders inside a directory.
mkdir() scandir() readdir()
$ar_dir = scandir("dir_name");
Accessing form fields

Last accessed pages

  1. Get and change IFrame content through a JavaScript script created in another IFrame (10873)
  2. createElement and insertBefore (6384)
  3. Read Excel file data in PHP - PhpExcelReader (77608)
  4. dompdf (2720)
  5. Insert, Select and Update NULL value in MySQL (52064)

Popular pages this month

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (522)
  2. Register and show online users and visitors (363)
  3. PHP-MySQL free course, online tutorials PHP MySQL code (273)
  4. querySelector and querySelectorAll (267)
  5. JavaScript Course - Free lessons (265)