| รูปแบบการสร้าง class | เป็นการสราง class ขึ้นมาใช้งาน |
|---|
subject:รูปแบบการสร้าง class
syntax:function className ( param1, param2, ..., paramN ) { property; method; }
content:เป็นการสราง class ขึ้นมาใช้งาน
example:function Person ( oName ) { this.name = oName; this.getName = function ( ) { return this.name; } } var panda = new Person ( "Function" ); alert ( panda.getName ( ) );