json

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script src="../jquery-1.11.2.min.js"></script>//加载jQUERY包
</head>
<body>
</body>
<script type="text/javascript">
$(document).ready(function(e) {
    
    //text
    //json 跨平台
    //xml 跨平台
    var a={code:"p001",name:"张三",age:18,shuzu:new Array(1,2,3,4),json:{aa:"aa",bb:"bb"}};//定义json格式,可以存放任意类型的数据,key和value成对存在
    alert(a.json.aa);//取值
    //接口
    //AJAX
    //封装插件 
    

    
});


</script>
</html>
原文地址:https://www.cnblogs.com/nannan-0305/p/5497432.html