Javascript Course

- The history object is part of the window object, and contains the URLs visited by the user (within a browser window).
It contains useful methods and properties that let you move back and forth through the user's history, and manipulate the contents of the history stack.
- Syntax:

window.history.property_name
window.history.methodName()

• The history object has two properties: length and state.
window.history.length - returns the number of URLs in the history list.
window.history.state - returns the object added in history with pushState() or replaceState().


Methods of the history object

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";
The history object

Last accessed pages

  1. Moving html element to a random direction (2463)
  2. Select in MySQL, Output results in HTML Table (16829)
  3. The School for Gods (3543)
  4. Add Tag to Selected Text in textarea with JavaScript (2561)
  5. PuzzleImg - Script to Create Image Puzzle Game (7293)

Popular pages this month

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