任天堂「今後C++は捨てJavaScriptで開発していく」 (887レス)
上
下
前
次
1-
新
203
(4)
: 2013/03/22(金)11:37
AA×
>>200
>>196
[240|
320
|
480
|
600
|
100%
|
JPG
|
べ
|
レス栞
|
レス消
]
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
ありがと それだとを隠蔽できてない を使う場合はこう
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 684 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
ぬこの手
ぬこTOP
0.036s