【发布时间】:2021-04-15 17:15:15
【问题描述】:
我在 SharePoint 2013 列表中有一个计算列(返回数据类型:日期和时间),我正在尝试检索值并在表单中显示。 我正在使用以下函数从 SharePoint 列表中获取值:
function getData(g_Data_URL) {
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + g_Data_URL,
type: "GET",
headers: {
"accept": "application/json;odata=verbose",
},
success: function(data) {
var Onsite= new Date(data.d.Onsite);
$('#Ontime').data("DateTimePicker").date(Onsite);
},
error: function(error) {
console.log(JSON.stringify(error));
}
});
}
如果调用值的语法不正确,请告诉我。
感谢任何帮助
【问题讨论】:
标签: javascript jquery sharepoint-2013