[英]When declaring a function to a variable that variable stores the function or a reference?
[英]Get value of variable that stores a a function
我知道这是一个SharePoint问题,但我感觉它更像是一个JavaScript问题。 我正在使用这个很棒的工具来填充我的SharePoint列表(Web部件)中的某些字段。 当我一个接一个地执行此操作时效果很好,但是我尝试请求多个列值,但无法正常工作。
var thisUsersValues = $().SPServices.SPGetCurrentUser({
fieldNames: ["ID", "Name", "SIP Address"],
debug: false
});
如何从此数组中获取特定的列值(例如“名称”)?
谢谢!
从源头看 ,似乎SPServices.SPGetCurrentUser()
函数返回一个关联数组,其键为传递给它的fieldNames
。
这意味着访问您可以使用的字段
thisUserValues.Name
要么
thisUserValues['Name']
免责声明:我没有Sharepoint或这个特定jQuery库的经验。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.