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 is used in <table> to create table header cell?
<thead> <th> <td>
<table><tr>
  <th>Title 1</th>
  <th>Title 2</th>
</tr></table>
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(){
  window.open("http://coursesweb.net/");
}
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");
var_export($ar_dir);
The history object

Last accessed pages

  1. The Stage, Panels and Tools in Flash (7508)
  2. Execute JavaScript scripts loaded via AJAX (5275)
  3. PHP MySQL - WHERE and LIKE (23086)
  4. Register and show online users and visitors (34309)
  5. PHP Unzipper - Extract Zip, Rar Archives (6269)

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)