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 2013-09-11 09:09  麦克斯韦科思  阅读(182)  评论(0编辑  收藏  举报