<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title></title> </head> <body> <script src="js/browser.min.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript"> class Calc { constructor(){ console.log('Calc constructor'); } add(a , b){ return a + b; } } var c = new Calc(); console.log(c.add(4,5)); </script> </body> </html>
相关文章
- 11-09JS 获取没有特定class的标签
- 11-09dom元素和class常用操作
- 11-09android.view.InflateException Error inflating class android.webkit.WebView
- 11-09字符串类 class string
- 11-09面向对象 part7 class
- 11-09class
- 11-09002-ES6Class和普通构造函数的区别
- 11-09Swift学习-Class
- 11-09ES6对象操作
- 11-09Vue:动态绑定class