1 <!DOCTYPE html>
 2 <html>
 3 <head lang="en">
 4     <meta charset="UTF-8">
 5     <title></title>
 6 </head>
 7 <body>
 8 <script>
 9 //    class Customer {
10 //        //属性
11 //        public String Name;
12 //        public String Age;
13 //        public String Money;
14 //        //方法
15 //        public void Buy (String id,int num,double price) {
16 //            self.money -= num * price;
17 //            //记录订单
18 //        }
19 //    }
20 //
21 //
22 //    var aaa = new Customer("name",18....);
23 
24 //js中new可以穿件function产生的对应,并不是用class.
25 //    function Stu(){
26 //
27 //    }
28 
29 
30 </script>
31 </body>
32 </html>
原文地址:https://www.cnblogs.com/BingBing-Deng/p/10277856.html