SP.Site.url Property

SharePoint 2010

Last modified: February 11, 2010

Applies to: SharePoint Foundation 2010

In this article
Property Value
Applies To

Gets the full URL to the root Web site of the site collection, including host name, port number, and path.

var value = SP.Site.get_url(); 

This property must not end with a leading forward slash ("/").