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

SP.Site Class

Remarks

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

See Also

Reference

SP.Site Methods

SP.Site Properties

SP Namespace