Guest User

Untitled

a guest
Nov 15th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. $(document).ready(function(){
  2.  
  3. $.ajax({
  4. url: _spPageContextInfo.siteAbsoluteUrl + "/_api/web/webs?$expand=Webs",
  5. method: "GET",
  6. headers: {
  7. "Accept": "application/json; odata=verbose"
  8. },
  9. success: function(data) {
  10.  
  11. for(i=0;i<data.d.results.length;i++){
  12. console.log(data.d.results[i].Title;
  13. }
  14.  
  15. },
  16. error: function(rootsite) {console.log("error ");},
  17. async: false
  18. });
  19.  
  20. });
Add Comment
Please, Sign In to add comment