SP.Site.serverRelativeUrl Property

Applies to: SharePoint Foundation 2010

In this article
Property Value
Applies To
Remarks

Gets the server-relative URL of the root Web site in the site collection.

var value = SP.Site.get_serverRelativeUrl(); 

Property Value

Type: String

Applies To

SP.Site Class

Exceptions

Remarks

The ServerRelativeUrl property contains a forward slash ("/").

See Also

Reference

SP.Site Methods

SP.Site Properties

SP Namespace