object Window

以下のコードを見てください。 <script type="text/javascript"> // トップレベルのコード中でthisを使用する alert(this); function init() { // トップレベルに定義された関数内でthisを使用する alert(this); } </script> このコードで使われている二つのalert()は、どちらも[object Window]と表示…