What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-02-20 06:25:16
javascript window.onpopstate example
window.onpopstate = function(event) { alert("location: " + document.location + ", state: " + JSON.stringify(event.state)); const urlParams = new URLSearchParams(window.location.search); const myParam = urlParams.get('myParam'); ... Add solution -
C++ 2022-02-14 00:25:04
stl queue
Functions used here: q.size() = Returns the size of queue. q.push() = It is used to insert elements to the queue. q.pop() = To pop out the value from the queue. q.front() = Returns the front element of t... Add solution -
Javascript 2022-02-02 19:51:26
angular back button
import {Component} from '@angular/core'; import {Location} from '@angular/common'; @Component({ // component's declarations here }) class SomeComponent { constructor(private _location: Location) {} backClicked() { this._location.back(); } } Add solution -
-
-
Javascript 2021-11-11 04:00:17
JavaScript Window History
// go back: window.history.back() // go forward: window.history.forward() // go to specific point: window.history.go(-2) // go back 2 pages, 0 is current page window.history.go(0) // refreshes current page window.history.go() // refreshes current page // ... Add solution