js static method
function foo( ){} // Declare class
foo.method = function(){} // Method body
uses: foo.method()
js instance Method function foo(){ // Declare class
this.method = function(){ // Method body
}
}
Use: var f = new foo(); f.method();
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn