30秒学会 JavaScript 片段 – httpsRedirect
Redirects the page to HTTPS if its currently in HTTP. Also, pressing the back button doesn’t t...
Redirects the page to HTTPS if its currently in HTTP. Also, pressing the back button doesn’t t...
Copy a string to the clipboard. Only works as a result of user action (i.e. inside a click event lis...
Returns the prefixed version (if necessary) of a CSS property that the browser supports. Use Array.p...
Returns true if the element specified is visible in the viewport, false otherwise. Use Element.getBo...
Run the callback whenever the user input type changes (mouse or touch). Useful for enabling/disablin...
Returns the scroll position of the current page. Use pageXOffset and pageYOffset if they are defined...
Removes an event listener from an element. Use EventTarget.removeEventListener() to remove an event ...
Adds an event listener to an element with the ability to use event delegation. Use EventTarget.addEv...
Creates a counter with the specified range, step and duration for the specified selector. Check if s...
Runs a function in a separate thread by using a Web Worker, allowing long running functions to not b...