0
這裏即時通訊新的jquery請幫助我爲什麼我不能夠2我的數據附加到表 在此代碼即時能夠從數據庫中獲取數據和它的存儲在val
但爲什麼val.Emp_Id
沒有約束力數據爲什麼我的jQuery表沒有附加數據val.EmpID
$(document).ready(function() {
$('#BtnData').click(function() {
$.ajax({
url: '/Query/LoadingData2',
method: 'GET',
dataType: 'Json',
success: function (data) {
var $table = $('<table/>').addClass('table table-responsive table-striped table-bordered');
var $header = $('<thead/>').html('<tr><th>Emp_Id</th></tr>');
$table.append($header);
$.each(data, function (i, val) {
var $row = $('<tr/>');
$row.append($('<td/>').html(val.Emp_Id));
debugger;
});
$('#updatePanel').html($table);
},
error: function() {
alert('Error...');
}
})
})
})
歡迎StackOverflow上。你的問題不會吸引好的答案,因爲它不清楚問題是什麼。請閱讀此內容,然後重新編輯您的問題以獲取清晰度:https://stackoverflow.com/help/how-to-ask – jdv