0

这是我的代码,适用于文件夹,但我想获取所有没有文件夹的项目。

获取列表项的代码。

var qo = '<QueryOptions><ViewAttributes Scope="Recursive"/></QueryOptions>';    

$().SPServices({
operation: "GetListItems",
async: false,
listName: list,
CAMLViewFields: f,
CAMLLimit: l,
CAMLQuery: q,    
CAMLQueryOptions: qo,



completefunc: function (xData, Status) {

 $(xData.responseXML).find("[nodeName='z:row']").each(function(i) {
        var liHtml = "<tr><td>" + $(this).attr("ows_Title") + "</td> <td>" + $(this).attr("ows_LinkFilenameNoMenu") + "</td> <td>" + $(this).attr("ows_Created") + "</td>  </tr>";
        var title = $(this).attr("ows_LinkTitle")

      $("#tasksUL").append(liHtml);

  });
   }
 });
4

1 回答 1

0

溶液清澈如水晶。

因此更改代码:

$(xData.responseXML).find("[nodeName='z:row']").each(function(i) {

为了这:

$(xData.responseXML).SPFilterNode("z:row").each(function() {   
于 2013-04-22T15:54:39.537 回答