easyui的combobox如何取消选中项

图片说明只能让选择其中三个选项,但是选了第四个的话我不想让在显示框显示出来,如何处理?

添加onSelect,判断值超过3个就unselect当前项
onSelect:onSelect

     <script>
        function onSelect(r) {
            if ($(this).combobox('getValues').length > 3) {
                var me = this;
                setTimeout(function () { $(me).combobox('unselect', r.id); }, 10)
            }
        }
    </script>

getvalue();