我在chrome开发人员工具中有这段代码,
oListItem.get_item('Fruits'): Array[1]
0: SP.FieldLookupValue
$1E_1: 2
$2d_1: "Big Round Apples;#Small Round Apples;"
__proto__: Object
length: 1
__proto__: Array[0]
如何获取文字Big Round Apples;#Small Round Apples;
目前使用此代码,
oListItem.get_item('Fruits').val();
我正在Object object
答案 0 :(得分:1)
多个SP.LookupField
值表示为SP.FieldLookupValue
//Get Multiple Lookup Field value
var fruitValues = item.get_item('Fruits');
for(var i = 0; i < fruitValues.length; i++) {
var fruitValue = fruitValues[i];
var fruitLabel = fruitValue.get_lookupValue();
var fruitId = fruitValue.get_lookupId();
}