随笔 - 25  文章 - 0  评论 - 0  阅读 - 22979

JS解析Json

        $.getJSON("DDSContact.aspx", { "type": "R" }, function (data) {
                    var strHTML = "";
                    $.each(data, function (InfoIndex, Info) {//遍历json里的数据  
                        strHTML += "<tr>";
                        strHTML += "<td><input type='radio' class='rdCheck' name='rdCheck' /></td>";
                        strHTML += "<td>" + Info["NAME"] + "</td>";
                        strHTML += "<td>" + Info["CITY"] + "</td>";
                        strHTML += "<td>" + Info["AIRPORT"] + "</td>";
                        strHTML += "<td>" + Info["ADDRESS"] + "</td>";
                        strHTML += "<td>" + Info["PHONENUMBER"] + "</td>";
                        strHTML += "<td>" + Info["TELNUMBER"] + "</td>";
                        strHTML += "<td>" + Info["EMAIL"] + "</td>";
                        strHTML += "</tr>";
                    });
                    myDialog.content(strHTML); // 填充对话框内容
                });

            });

posted on   麦克斯韦科思  阅读(182)  评论(0编辑  收藏  举报
< 2025年1月 >
29 30 31 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31 1
2 3 4 5 6 7 8

点击右上角即可分享
微信分享提示