JavaScript を使用して SharePoint RESTful API に取り組んでいます。_spPageContextInfoを使用すると機能しません。
エラー: Uncaught ReferenceError: _spPageContextInfo が定義されていません
ここに私が使用したコードがあります
<html xmlns="http://www.w3.org/1999/xhtml">
<script src="../Scripts/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$.getJSON(_spPageContextInfo.webServerRelativeUrl + "/_api/web/currentuser",
function (data) {
$("#message").text('hello' + data.d.Title);
});
});
</script>
...