post json返回空值

时间:2017-09-12 16:13:19

标签: jquery json

我正在使用json创建一个模态,我使用此代码将变量传递给使用json_encode()返回代码的存储过程 我的问题是,json什么都没有返回。

我正在使用此代码:

$('table.mytable').on('click', '.edit-row', function () {
$("#ProjectID").val($(this).data('projectid'));
$("#StepID").val($(this).data('stepid'));

$.post('', {GetList: 1, ProjectID: $(this).data('projectid'), StepID: $(this).data('stepid')}, function (data) {
var html = '';
$.each(data, function (index, value)
{
   html += '          <tr> ';
   html += '               <td> '+ value.value1 +' </td>\
                           <td> '+ value.value2 +' </td>\
                           <td> '+ value.value3 +'</td>';
   html += '           <tr>';
 });
 $('table#my-tb > tbody').html(html);

    }, 'json');
 });

0 个答案:

没有答案