当我们在用sharepoint中自带的人员选择器PeopleEditor的时候,有的时候会用js来清除选择的人员,这个时候就需要用到下面的的几段代码:
var currentPeopleEditorID="ctl00_PlaceHolderMain_peUsers";
$("#" + getSubControlID("currentPeopleEditorID", g_EntityEditorUpLevelId) + "").html("");
$("#" + getSubControlID("currentPeopleEditorID", g_EntityEditorHiddenId) + "").val("");
$("#" + getSubControlID("currentPeopleEditorID", g_EntityEditorDownLevelId) + "").val("");