SP.ClientContext.url property (sp.js)
Gets the URL associated with the runtime context.
Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013
var value = SP.ClientContext.get_url()
Return value
String
The URL associated with the runtime context.