Use the JS download library to download resources
HTML5's a tag can use the download attribute to set the download of resources, but it needs to be of the same origin, and if the browser can parse it, it will also open directly. At this time, we can use a third-party library download...
PHP Remove the first element of the array
PHP removes the first element of the array using the function array_shift()
Example
Several ways to get the content of the input box in JavaScript
There are several ways to get the content of the input box in JavaScript:
Method 1 document.getElementById('textbox_id').value // Get the content of the specified id
Example...
Implementing Copy Function in JavaScript
This article will learn how to implement the copy function through JavaScript. Method One: Using simple JavaScript code We can use the Clipboard API's Clipboard.writeText()...
JS Get the current page URL
In the process of WEB development, we often need to get the current page's URL. This chapter introduces how to get the current page's URL through JavaScript. JS Get the current page's U...
JavaScript Methods for Checking Null, NULL, and undefined
If JavaScript needs to determine whether a variable is defined, it can use typeof:
Example if(typeof someVar == 'undefined') { document.writ...
How to determine if a JavaScript object is empty?
This chapter mainly introduces how to determine if a JavaScript object is empty? When we make asynchronous (Ajax) requests, sometimes we get an empty object, as follows: var a = {}; ...
How to determine if an element is hidden with jQuery
This article introduces how to determine if an element is hidden with jQuery:
// Determine CSS property display:[none|block], ignore visibility:[true|false] // Determine if the element is displayed ...
Remove an element from a JavaScript array
This article introduces how to remove an element from a JavaScript array. The following example we define a custom method to remove an array element: Example Array.prototype.removeByValue = function...
JavaScript Timestamp to Date Format Conversion
This article introduces how to convert a timestamp to a date format through JavaScript. Mainly uses the JavaScript Date object.
The Date object is used to handle dates and times. Create Date ...
-
-2
-3
-