What do you want to save?
Add Code snippet
New code examples
-
Html 2021-11-07 19:37:14
HTML DOM insertAdjacentHTML() Method
<!DOCTYPE html> <html> <body> <h1>HTML DOM insertAdjacentHTML() Method</h1> <p>This method inserts a specified text as HTML, into a specified position in the document.</p> <h2 id="myH2">My Heade... Add solution -
Other 2021-10-30 07:01:07
typeerror: failed to execute
#I could have sworn that I was using appendChild properly but, alas, I wasn’t. #Instead of passing a node to appendChild, I was passing a string. var link = '<a class="wplauncher-link"> Example Link </a>'; var body = document.... Add solution -
Other 2021-10-24 00:21:09
Wiki search app
// JavaScript Document let resultsList = document.getElementById('resultsList'); let searchForm = document.getElementById('searchForm'); let searchInput = document.getElementById('searchInput'); searchForm.addEventListener('submit', (e)=> { e.preven... Add solution -
Other 2021-10-08 05:19:02
Search wikipedia
// JavaScript Document let resultsList = document.getElementById('resultsList'); let searchForm = document.getElementById('searchForm'); let searchInput = document.getElementById('searchInput'); searchForm.addEventListener('submit', (e)=> { e.preven... Add solution -
Javascript 2021-10-03 19:08:02
mozilla observer onclick
var observeDOM = (function(){ var MutationObserver = window.MutationObserver || window.WebKitMutationObserver; return function( obj, callback ){ if( !obj || obj.nodeType !== 1 ) return; if( MutationObserver ){ // define a new observer... Add solution -
Other 2021-09-28 04:04:04
store object in input value
// encoding let obj = { key1: "foo", key2: "bar" }; document.querySelector('body').insertAdjacentHTML('beforeend', `<input name="sample_input" id="input" value=${encodeURIComponent(JSON.stringify(obj))}>`)... Add solution -
Javascript 2021-09-20 02:45:01
window.addEventListener("online");
window.addEventListener('load', function() { var status = document.getElementById("status"); var log = document.getElementById("log"); function updateOnlineStatus(event) { var condition = navigator.onLine ? "online"... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5