5.1Object类型

<!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可能返回下列的某个字符串
             * "undefined"-如果这个值未定义
             * "boolean"-如果这个值是布尔值
             * "string"-如果这个值是字符串
             * "number"-如果这个值是数值
             * "object"-如果这个值是对象/null
             * "function"-如果这个值是函数
             */
            
            var message="some string";
            alert(typeof message);//string
            alert(typeof (message));//string
            alert(typeof 95);//number
        </script>
    </head>
    <body>
    </body>
</html>

猜你喜欢

转载自www.cnblogs.com/cjl-serics/p/8976429.html
5.1