<!DOCTYPE HTML> <html> <head> <meta http-equiv="content-type" content="text/html" /> <meta name="author" content="blog.anchen8.net" /> <title>無標題 1</title> </head> <body> <script type="text/javascript"> <!-- function Createo(a,b) { this.name = a; this.age = b; this.show = function(){alert(this.name);alert(this.age);}; } Createo.prototype.show2 = function() { alert(this.name + '=' + this.age); }; var o1 = new Createo('許文奕','37'); o1.show(); o1.show2(); --> </script> </body> </html>