我有两个人选择器列,名为Current User and Issue Owner。基于两个人选择器列之间的比较,我想要第三个字段隐藏/显示。如果人物选择器列具有相同的值,我需要显示它,否则隐藏它。 我在这做错了什么?
<script src="/sites/risk/Style%20Library/jquery-3.1.1.min.js"></script><script src="/sites/risk/Style%20Library/sputility.min.js"></script><script>
//$(document).ready(function(){
var currentuser = SPUtility.GetSPField('Current User');
var issueowner = SPUtility.GetSPField('Issue Owner');
var HideOrShowOthersField=function(){
var currentuserValue = currentuser.GetValue();
var issueownerValue = issueowner.GetValue();
if(currentuserValue!=issueownerValue)
{
SPUtility.GetSPField('Issue Owner Review Status').Hide();
}
else
{
SPUtility.GetSPField('Issue Owner Review Status').Show();
}
};
HideOrShowOthersField();
});
</script>