SP.WebInformation.serverRelativeUrl property (sp.js)

A DateTime representing the last time a Web site item was changed.

Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013

var value =SP.WebInformation.get_serverRelativeUrl()

Return value

A String representation of the server relative URL.