var Human = function(name) { this.name = name; }; Human.prototype = { sayMyName: function() { alert(this.name); } }; var amachang = new Human('天野');
// Human クラスを定義する var Human = Class.create(); Human.prototype = { // コンストラクタ initialize: function(name) { this.name = name; }, // メソッド sayMyName: function() { alert(this.name); } };
カテゴリー
チャンネル
ニュース
テクノロジーポータルTEDIA パッケージソフトウェアならFind-IT エレクトロニクスならEETimes Japan
| 本サイトのご利用について | お問い合わせ | プライバシーについて | 会社概要 | インプレスグループサイト | インプレスグループTOP |
Copyright ©2004-2009 IMPRESS BUSINESS MEDIA CORPORATION, an Impress Group company. All rights reserved.