function Car(name,speed){ this,name=name; this.speed=speed; }
Car.prototype.showName=function(){
console.log(this.name) }
var car=new Car("奔驰",300); var car2=new Car("宝马",280);
console.dir(car); console.dir(car2); //car2.showname(); </script> </head> <body> </body> </html>