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
What attribute makes an option from <select> selected?
checked="checked" selected="selected" disabled="disabled"
<select name="a_name">
 <option value="val1">Option 1</option>
 <option value="val2" selected="selected">Option 2</option>
</select>
What CSS value allows to create color gradients for background?
contain repeat-x linear-gradient
#id {
  background: linear-gradient(top left, #1f1, #fff, #11f);
}
What statement creates an array in JavaScript?
[] {} new Object()
var arr = [1, "CoursesWeb.net", "MarPlo.net"];
alert(arr[2]);
Indicate the PHP function used to redirect to other page.
function() header() switch()
header("Location: http://coursesweb.net/");
exit;
The history object

Last accessed pages

  1. JavaScript Scripts (1859)
  2. Remove / Get duplicate array values - Reset array keys in PHP (11292)
  3. PuzzleImg - Script to Create Image Puzzle Game (5449)
  4. Create simple Website with PHP (29225)
  5. querySelector and querySelectorAll (17166)

Popular pages this month

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (41)
  2. Read Excel file data in PHP - PhpExcelReader (25)
  3. Create simple Website with PHP (23)
  4. JavaScript Course - Free lessons (20)
  5. AJAX Course, free Lessons (17)