Javascriptのevalをオブジェクト指向に
読了まで:約0分
概要: Javascript のeval
を
Javascript でeval
String.prototype.eval = function () {
return eval( '' + this );
}
コードの
とり
- Firefox 2.0
- Opera 9.2
- Internet Explorer 6
で
eval
のthis
とeval( this )
と
これで、
'alert("hoge")'.eval()
とか
prototype 拡張って
追記:2007-02-08T10:30:00+09:00
コメント欄でeval
eval(this)
が
詳しくは
情報
#FIXME