zoukankan      html  css  js  c++  java
  • json

    json数据:

    [
        {
            "AttributeSetsID": "29",
            "AttributeSetsValues": "主体",
            "children": [
                {
                    "AttributeID": "25",
                    "AttributeValues": "尺寸"
                },
                {
                    "AttributeID": "26",
                    "AttributeValues": "重量"
                }
            ]
        },
        {
            "AttributeSetsID": "30",
            "AttributeSetsValues": "网络a",
            "children": [
                {
                    "AttributeID": "27",
                    "AttributeValues": "长度"
                },
                {
                    "AttributeID": "28",
                    "AttributeValues": "宽度"
                },
                {
                    "AttributeID": "29",
                    "AttributeValues": "高度"
                }
            ]
        },
        {
            "AttributeSetsID": "32",
            "AttributeSetsValues": "基本参数",
            "children": [
                {
                    "AttributeID": "30",
                    "AttributeValues": "面积"
                }
            ]
        }
    ]

       $.post("../Handler/AddGoods.ashx?type=GetGoodsAttributes&category=" + $("#category").val(), {}, function (data) {
                            
                             
                                    $.each(data, function (i, item) {

                                        alert(item.AttributeSetsValues);
                                        $.each(item.children, function (i, item1) {

                                            alert(item1.AttributeValues);

                                        })
                                    })
                            }, 'json')

  • 相关阅读:
    关于quartusII 错误 Error: Current license file does not support the EP*** device 错误原因总结
    怎样用delphi关闭并重新启动 explorer.exe进程
    SQL创建链接服务器
    C#服务启动以及服务指令
    底部广告弹出
    选项卡
    tab切换
    pagex/y offsetx/y screenx/y clientx/y 用法及区别
    放大镜jQuery效果
    放大镜js实现效果
  • 原文地址:https://www.cnblogs.com/zhangweixin/p/4000108.html
Copyright © 2011-2022 走看看