(1) Alert function: Displays a warning dialog box, including an OK button.
(2) Confirm Function: Displays a confirmation dialog box, including OK, Cancel button.
(3) Escape Function: Converts a character to a Unicode code.
(4) eval function: Evaluates the result of an expression.
Eval ("X=10;y=20;document.write (X*y)"); document.write (eval ("+ +)"); var x=10; document.write (eval (x+17));
The eval function can execute strings as JavaScript code, but this approach is violent and affects the efficiency of JavaScript code, and it's best to avoid using
(5) IsNaN function: The test is (true) No (false) is not a number.
(6) parsefloat Function: Converts a string into a numeric form of a character.
(7) parseint Function: Converts a string into an integer number form (can specify a few binary).
(8) prompt function: Displays an input dialog box prompting for user input. For example:
<scriptlanguage= "JavaScript" > Alert ("Input error"); Prompt ("Please enter your name", "name");//(title, default value) confirm ("OK no! "); </script>
(9) unescape function: Decodes characters encoded by the escape function.
(10) isfinite (number) to detect whether a value can be a finite digit, which returns TRUE or False
(11) IsNaN (string) to detect whether a value is not a finite number
(12) decodeURI () Decodes the encoded URI address
(13) decodeuricomponent () Decodes the encoded URI component
(14) encodeURI () to encrypt a string as a URI
(15) encodeURIComponent () encode a string as a URI component
General functions of JavaScript