入れ子のオブジェクトはJavaScriptで名前空間を実装するのに便利。
var FindxFine = {};
FindxFine.Custom = function() {
this.name = 'custom';
};
FindxFine.Custom.prototype.showName = function() {
alert(this.name);
};
var o = new FindxFine.Custom();
o.showName();
No comments yet.
改行と段落タグは自動で挿入されます。
メールアドレスは表示されません。