why is the value of height() in chrome different w

2020-05-03 09:52发布

问题:

My script like this :

$.ajax({ 
    url: _url,
    type: 'GET', 
    dataType: "json",
    contentType: "application/json; charset=utf-8",
    success: function (result) {
        ...
    }
}).done(function () {
    for(var i=0;i<7;i++) {
        this["td"+i] = $('#bodychel-' + coachId + clubId + ' table tbody td:eq(' + (i) + ')').height();
        $('#bodychel-' + coachId + clubId + ' table thead th:eq(' + (i) + ')').css({ height: this["td"+i] });
    }
});

If I console.log(this["td"+i]);, the result is different between chrome and safari. the result of chrome is true

How can I solve this problem?