Tag: sharepoint 2013

如何使用JQuery或JavaScript和Fill DropDownList检索sharepoint 2013列表数据?

我正在尝试使用JavaScript检索列表数据。 但出了点问题。 我正在尝试调试代码,但我无法理解那件事。 以下是JavaScript代码: ExecuteOrDelayUntilScriptLoaded(PopulateDepartments, “sp.js”); var _ctx = null; var _web = null; var _allItems = null; function PopulateDepartments() { debugger; _ctx = SP.ClientContext.get_current(); _web = _ctx.get_web(); var list = _web.get_lists().getByTitle(“ServiceType”); var query = new SP.CamlQuery(); query.set_viewXml(“”); _allItems = list.getItems(query); _ctx.load(_allItems, ‘Include(Title,ID)’); debugger; _ctx.executeQueryAsync(Function.createDelegate(this, this.PopulateDepartmentSuccess), Function.createDelegate(this, this.PopulateDepartmentFaild)); } function PopulateDepartmentSuccess() { var ddlEntry = […]