JavaScript use Alert Dialog Prevent Page Refresh and Page Close Mis-Operate

In Weh Dev, Sometime we need Prevent Mis-Operate from Page Refresh and Page Close, JavaScript will help a lot here, this topic show how to use JavaScript Dialog to Prevent Mis-Operate Window Close and Window Refresh

Javascript array sort demo

Javascript array sort demo

Javascript Array Copy Methods Suggestion

Javascript Array Copy Methods Suggestion

JavaScript Native Time Format Function

JavaScript Native Time Format Function

Full Clone Data Object In Javascript

When Coding Vue, found problem of full clone data Object(Array), solved by the follow code

always use var in your js code

a very important idea, I got this by a small bug, but the small bug cost me 1 hour.

js code reload page

demo Javascript code for reload page

get int in Javascript

format number to int in Javascript

JS Javascript string to number transform

transform string to number in Javascript

random num generate function in JavaScript or jQuery

a quick and easy use function for JavaScript or jQuery generate random number