<script>
    //定义一个对象,提供对应的方法或者属性
    var s = {
        sd1: function () { },
        sd2: function () { },
        index: "2",
    }
    s.sd1;
    s.sd2;
    s.index
    //定义一个函数t,提供对外访问的方法
    var t = function () {
        function t1() { }
        function t2() { }
        return {
            it1: t1,
            it2: t2
        }
    }();
    t.it1
    t.it2
</script>

相关文章:

  • 2021-10-09
  • 2021-10-02
  • 2022-12-23
  • 2022-12-23
  • 2021-06-04
  • 2022-01-23
  • 2022-12-23
猜你喜欢
  • 2022-01-31
  • 2021-12-14
  • 2022-12-23
  • 2021-10-24
  • 2021-05-30
  • 2022-12-23
相关资源
相似解决方案