ITPub博客

首页 > 应用开发 > > 函数可以return多个值?不是只能return一个值的吗?

函数可以return多个值?不是只能return一个值的吗?

作者:kissxun 时间:2019-10-09 17:06:38 0 删除 编辑
var getValue = function(className) {
            var $elem = $('' + className + '');
                // 走路的路线坐标
            return {
                height: $elem.height(),
                top: $elem.position().top
            };
        };


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2766/viewspace-3127253/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-04-16

  • 博文量
    97
  • 访问量
    1048