日期:2014-05-16  浏览次数:20603 次

请问在 $.ajax 里面的 data 怎么写啊?
 function ShowDetail(id) {
     
     $.ajax({
                        url: "/Bood/ShowBookDetail",
                        type: "Get",
                        dataType: 'html',
                        data:id,    《===我这里写的对嘛?
                        success: function (data) {
                            alert(data);
                            $("#BookDetailPopup").html(data);
                        },
                        error: function (msg) {
                            alert("error:" + msg.responseText);
                        }

                    })
        
    };


这里的  id 为 Guid       但是总是id传不成功,总是报错id 为空!

------解决方案--------------------
引用:
data:{id:xxx} 或者 data:"id="+xxx



xxx换成你传进来的参数值