HK Technical Logo
Showing posts with the label JavaScriptShow all

JavaScript Code to get and set cookie function for 2 hours

JavaScript cookie Set codeThis code defines a function setCookie that sets a cookie with the giv…

How to split the text nodes from a snapshot by line breaks in javascript

// Find all text nodes in the documentconst textNodes = document.evaluate("//text()",…