在JS实例里使用 Class 的静态方法 Posted on 2019-03-16 | In javascript 参考:https://stackoverflow.com/questions/43614131/js-call-static-method-from-class 12345678910111213class StaticMethodCall { constructor() { console.log(StaticMethodCall.staticMethod()); // 'static method has been called.' console.log(this.constructor.staticMethod()); // 'static method has been called.' } static staticMethod() { return 'static method has been called.'; }}