JSOM从GUID获取站点 [英] JSOM get site from GUID

查看:82
本文介绍了JSOM从GUID获取站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 使用JSOM怎样才能获得 像powershell脚本的URL

 Using JSOM how can get the  URL like the powershell script

$ web = get-spweb -Site 87d28faf-a0ac-4ac6-80a1-96aca53d07b7

$web = get-spweb -Site 87d28faf-a0ac-4ac6-80a1-96aca53d07b7

$ web.Url

$web.Url

谢谢。

推荐答案

您好

试试这个

var 上下文 = SP ClientContext ();

var relativeWebUrl = context get_url ();

var fullWebUrl = 窗口 location 协议
+ '//' + 窗口 位置 host
+ relativeWebUrl

var context = new SP.ClientContext();
var relativeWebUrl = context.get_url();
var fullWebUrl = window.location.protocol + '//' + window.location.host + relativeWebUrl


这篇关于JSOM从GUID获取站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆