首页 新闻 会员 周边 捐助

JS JS JS 为什么能alert 出来 但是提示未定义

0
[已关闭问题] 关闭于 2017-07-15 14:38

  function tesyt(getdata, UNYearsMonth_arrs) {
        var dataObj1 = eval("(" + getdata + ")");
        var json = {};
        var lst = [];
        var obj1 = {};
        for (var i = 0; dataObj1.rows.length; i++) {
            //alert(dataObj1.rows[i].MeetDate);   //能输出
            myDate = new Date(dataObj1.rows[i].MeetDate); 

//提示TypeError: dataObj1.rows[i] is undefined
            YearsMonthStr = myDate.getFullYear() +"-"+ (myDate.getMonth()+1);
            if (UNYearsMonth_arrs[0] == YearsMonthStr) {
            obj1['Theme'] = dataObj1.rows[i].Theme;
            obj1['MeetDate'] = dataObj1.rows[i].MeetDate;
            obj1['BeginTime'] = dataObj1.rows[i].BeginTime;
            obj1['Duration'] = dataObj1.rows[i].Duration;
            obj1['MeetRoomId'] = dataObj1.rows[i].MeetRoomId;
            obj1['MainBranch'] = dataObj1.rows[i].MainBranch;
            }
        }
        lst.push(obj1);
        json['content'] = lst;
        var js = JSON.stringify(json);
        alert(js);
    }

落幕。的主页 落幕。 | 初学一级 | 园豆:2
提问于:2017-07-15 14:27
< >
分享
所有回答(1)
0

var name = '小明';
var age = 20;
alert(你好, ${name}, 你今年${age}岁了!);

ZHANGLayZ | 园豆:202 (菜鸟二级) | 2020-06-11 09:16
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册