js中数据类型

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">html

<html xmlns="http://www.w3.org/1999/xhtml">数组

<head>ui

<title>js变量的声明和类型</title>spa

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />xml

<meta name="description" content="布尔教育 http://www.itbool.com" />htm


</head>对象

    <body>ip

     js的变量的声明utf-8

string int boolean null undefined未定义类型string

array()数组

    <script>

     var arr={a:'b','b':'c','c':'d'};//对象类型

     document.write(arr.a); //显示对象中的元素

     document.write(arr[a]);//遇到.语法不灵

     var  aa=[1,2,3,4,5];

     document.write(aa);//显示数组

var hello="hello";

alert("hello");

</script>

    </body>

</html>

相关文章
相关标签/搜索