What do you want to save?
Add Code snippet
New code examples
-
Html 2021-10-05 00:03:02
how to get data from html page using javascript
<p id="par">hi</p> <!--put script in head tag--> <script type="text/javascript"> document.getElementById('par')//then whatever u want to do with it like window.location or something// </script> Add solution -
Javascript 2021-10-04 11:35:02
javascript video after play
<script type="text/javascript"> // Do not name the function "play()" function playVideo(){ var video = document.getElementById('video'); video.play(); video.addEventListener('ended',function(){ window.location... Add solution -
Other 2021-10-04 05:52:03
get current url ionic 4
With pure JavaScript: console.log(window.location.href); Using Angular: this.router.url import { Component } from '@angular/core'; import { Router } from '@angular/router'; @Component({ template: 'The href is: {{href}}' /* Other component... Add solution -
Javascript 2021-10-04 00:29:03
js add params to url
function setQueryStringParameter(name, value) { const params = new URLSearchParams(window.location.search); params.set(name, value); window.history.replaceState({}, "", decodeURIComponent(`${window.location.pathname}?${params}`)); } Add solution -
Javascript 2021-10-03 11:50:05
prevent browser back button jquery
window.onload = function () { if (typeof history.pushState === "function") { history.pushState("jibberish", null, null); window.onpopstate = function () { history.pushState('newjibberish', null, null); ... Add solution
Best helpers
Ranking is empty