SP.Site.url Property
Applies to: SharePoint Foundation 2010
In this article
Property Value
Applies To
Remarks
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();
Property Value
Type: String
Applies To
Remarks
This property must not end with a leading forward slash ("/").