Explain Codes LogoExplain Codes Logo

Javascript

Is it possible to append to innerHTML without destroying descendants' event listeners?

javascript
dom-manipulation
event-listeners
appendchild

How can I do string interpolation in JavaScript?

javascript
template-literals
string-interpolation
es6

Invalid date in safari

javascript
date-fns
moment-js
regex

Copy folder recursively in Node.js

javascript
fs-extra
async-await
promises

Javascript regex multiline text between two tags

javascript
regex
multiline
flags

Inserting string at a specific position in a string using JavaScript

javascript
prompt-engineering
functions
callbacks

How to add a “readonly” attribute to an <input>?

javascript
dom-manipulation
javascript-best-practices
jquery

How to identify if a webpage is being loaded inside an iframe or directly into the browser window?

javascript
iframe-detection
cross-origin-restrictions
same-origin-policy

How to get the onclick calling object?

javascript
event-handling
unobtrusive-javascript
event-delegation

Text Blinking jQuery

javascript
best-practices
functions
callbacks

How to set the name of a file downloaded from a browser?

javascript
blob
file-download
javascript-techniques

How to distinguish between left and right mouse click with jQuery

javascript
event-delegation
jquery-plugins
cross-browser-consistency

Selecting text in an element (akin to highlighting with your mouse)

javascript
prompt-engineering
best-practices
accessibility

How to run a function when the page is loaded?

javascript
event-listeners
window.onload
defer-attribute

How do I pass variables and data from PHP to JavaScript?

javascript
ajax
async-await
javascript-injection

Is Safari on iOS 6 caching $.ajax results?

javascript
ajax
caching
safari

How to reload or re-render the entire page using AngularJS

javascript
angularjs
performance-considerations
re-rendering-techniques

How can I add or update a query string parameter?

javascript
url-management
query-string-parameters
url-search-params

Removing an item from a select box

javascript
prompt-engineering
vanilla-js
event-handling

How to decode HTML entities using jQuery?

javascript
prompt-engineering
functions
callbacks