5.1Object type

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>New Web Project</title>
        <script>
            /*
             * typeof may return one of the following strings
             * "undefined" - if the value is undefined
             * "boolean" - if the value is a boolean
             * "string" - if the value is a string
             * "number" - if the value is numeric
             * "object" - if the value is an object/null
             * "function" - if the value is a function
             */
            
            var message="some string";
            alert(typeof message);//string
            alert(typeof (message));//string
            alert(typeof 95);//number
        </script>
    </head>
    <body>
    </body>
</html>

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325102253&siteId=291194637