2008-09-28から1日間の記事一覧
javacriptのスコープの順番は厄介だ。。。 例えば、あるオブジェクトに以下のようなコンストラクタ関数が定義されている。 function hoge(hogehoge) { this.hoge = hogehoge ; this.say = function() { alert(this.hoge) ; } } で、以下のようにprototype宣…
javacriptのスコープの順番は厄介だ。。。 例えば、あるオブジェクトに以下のようなコンストラクタ関数が定義されている。 function hoge(hogehoge) { this.hoge = hogehoge ; this.say = function() { alert(this.hoge) ; } } で、以下のようにprototype宣…