Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getItems(url) {
- return $.ajax({
- url: _spPageContextInfo.webAbsoluteUrl + url,
- type: "GET",
- headers: {
- "accept": "application/json;odata=verbose",
- }
- });
- }
- getItems( "/_api/Web/Lists/GetByTitle('<list title>')/Items" ).done(function(data){
- var numofItems = data.d.results.length;
- $("#<div id>").append("<b>" + numofItems + "</b>");
- });
Add Comment
Please, Sign In to add comment