Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http://mysite/ <--- root site in `/` site collection
- http://mysite/subsite1
- http://mysite/subsite2
- http://mysite/sitecol1/ <-- root site in `/sitecol1` site collection
- http://mysite/sitecol1/mysubsiteinsitecol1
- http://mysite/sitecol1/mysubsiteinsitecol2
- var clientContext = new SP.ClientContext();
- var site = clientContext.get_site();
- clientContext.load(site);
- clientContext.executeQueryAsync(function(){
- console.log(site.get_url());
- },
- function(){
- console.log("something went wrong");
- });
Add Comment
Please, Sign In to add comment