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:
coursesweb.net/javascript/properties-methods-form-elements

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which tag adds a new line into a paragraph?
<b> <br> <p>
First line ...<br>
Other line...
Which CSS property can be used to add space between letters?
text-size word-spacing letter-spacing
#id {
  letter-spacing: 2px;
}
What JavaScript function can be used to get access to HTML element with a specified ID?
getElementById() getElementsByTagName() createElement()
var elm = document.getElementById("theID");
var content = elm.innerHTML;
alert(content);
Click on the "echo" correct instruction.
echo "CoursesWeb.net" echo "CoursesWeb.net"; echo ""CoursesWeb.net";
echo "Address URL: http://CoursesWeb.net";
Accessing form fields

Last accessed pages

  1. Get Mouse coordinates inside a Div or an Image (13784)
  2. Magic Methods __get, __set, __call, __toString (2860)
  3. JavaScript base64 encode decode (5034)
  4. Follow the mouse cursor with a DIV inside a Parent (6308)
  5. PHP Unzipper - Extract Zip, Rar Archives (15410)

Popular pages this month

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (713)
  2. PHP Unzipper - Extract Zip, Rar Archives (712)
  3. SHA256 Encrypt hash in JavaScript (614)
  4. Read Excel file data in PHP - PhpExcelReader (529)
  5. SHA1 Encrypt data in JavaScript (437)