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

Last accessed pages

  1. Insert, Select and Update NULL value in MySQL (36877)
  2. Read Excel file data in PHP - PhpExcelReader (65674)
  3. Get Attribute (ID, Class, Name, Title, Src) with jQuery (57523)
  4. Contact page - CoursesWeb (8485)
  5. Tabs effect with CSS (9197)

Popular pages this month

  1. Making DIV Contents Scroll Horizontally, with multiple Div`s inside (2415)
  2. Contact page - CoursesWeb (2334)
  3. Tabs effect with CSS (2325)
  4. Insert, Select and Update NULL value in MySQL (1315)
  5. PHP getElementById and getElementsByTagName (904)