Guest User

Untitled

a guest
Apr 27th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. http://mysite/ <--- root site in `/` site collection
  2. http://mysite/subsite1
  3. http://mysite/subsite2
  4.  
  5. http://mysite/sitecol1/ <-- root site in `/sitecol1` site collection
  6. http://mysite/sitecol1/mysubsiteinsitecol1
  7. http://mysite/sitecol1/mysubsiteinsitecol2
  8.  
  9. var clientContext = new SP.ClientContext();
  10. var site = clientContext.get_site();
  11. clientContext.load(site);
  12. clientContext.executeQueryAsync(function(){
  13. console.log(site.get_url());
  14. },
  15. function(){
  16. console.log("something went wrong");
  17. });
Add Comment
Please, Sign In to add comment