Last active
July 3, 2020 17:50
-
-
Save xsolon/2903d742cc99be04c331fa995b4c1391 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<%@ Page Language="C#" %> | |
<%@ Register tagprefix="SharePoint" namespace="Microsoft.SharePoint.WebControls" assembly="Microsoft.SharePoint" %> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=11" /> | |
<title>Test - JSOM</title> | |
<SharePoint:ScriptLink runat="server" name="microsoftajax.js"/> | |
<SharePoint:ScriptLink runat="server" name="core.js"/> | |
<SharePoint:ScriptLink runat="server" name="sp.js" /> | |
</head> | |
<body> | |
<form id="form1" runat="server"> | |
<SharePoint:FormDigest runat="server"/> | |
<SharePoint:ScriptBlock runat="server"> | |
// jsom is ready // ExecuteOrDelayUntilScriptLoaded(function(){},'sp.js') | |
var ctx = SP.ClientContext.get_current(); | |
var web = ctx.get_web(); | |
ctx.load(web); | |
ctx.executeQueryAsync(function(){ | |
console.log(web.get_title()); | |
}); | |
</SharePoint:ScriptBlock> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment