任天堂「今後C++は捨てJavaScriptで開発していく」 (887レス)
任天堂「今後C++は捨てJavaScriptで開発していく」 http://mevius.5ch.net/test/read.cgi/tech/1363752460/
上
下
前
次
1-
新
通常表示
512バイト分割
レス栞
203: デフォルトの名無しさん [sage] 2013/03/22(金) 11:37:19.10 >>200 ありがと。 >>196 それだと、maxLengthを隠蔽できてない。 newを使う場合はこう。 var Foo = function() {var maxLength;}; Foo.prototype.setMaxLength = function(val) {maxLength = val;} Foo.prototype.getMaxLength = function() {return maxLength;}; var x = new Foo(); console.log(x.maxLength); // => undefined x.setMaxLength(100); console.log(x.getMaxLength()); // => 100 console.log(x.maxLength); // => undefined x.maxLength = 200; // => can't change Foo's property console.log(x.getMaxLength()); // => 100 try { console.log(x.getMaxlength()); } catch (e) { console.log(e.message); } http://mevius.5ch.net/test/read.cgi/tech/1363752460/203
メモ帳
(0/65535文字)
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 684 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.015s