最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Accessing Sharepoint list data in a normal HTML page using JavaScript - Stack Overflow

programmeradmin9浏览0评论

I am trying to create a simple HTML page where i wanted to display a list of items from a SharePoint list. Basically my JavaScript has to pull the data from SharePoint list and display in HTML page.

I have tried some sample from internet, nothing worked. Can anybody have any samples on this. Please help me to implement this.

I am trying to create a simple HTML page where i wanted to display a list of items from a SharePoint list. Basically my JavaScript has to pull the data from SharePoint list and display in HTML page.

I have tried some sample from internet, nothing worked. Can anybody have any samples on this. Please help me to implement this.

Share Improve this question edited Jun 3, 2012 at 21:29 Chad Ferguson 3,0915 gold badges37 silver badges42 bronze badges asked Apr 6, 2011 at 6:18 DineshDinesh 2,0668 gold badges40 silver badges61 bronze badges 1
  • This is too vague. Please ask a specific question (and provide sample code if possible). – JustinStolle Commented Apr 6, 2011 at 6:32
Add a ment  | 

1 Answer 1

Reset to default 5

You can use jQuery Library for Sharepoint WebService

<script type="text/javascript" src="filelink/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="filelink/jquery.SPServices-0.5.4.min.js"></script>
<script language="javascript" type="text/javascript">

$(document).ready(function() {
  $().SPServices({
    operation: "GetListItems",
    async: false,
    listName: "Announcements",
    CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
    pletefunc: function (xData, Status) {
      $(xData.responseXML).find("[nodeName='z:row']").each(function() {
        var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>";
        $("#tasksUL").append(liHtml);
      });
    }
  });
});
</script>
<ul id="tasksUL"/>
发布评论

评论列表(0)

  1. 暂无评论