From fc1482b743e8f428c77adadeebbe243b94f9a7c9 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Fri, 2 Jul 2021 23:31:38 +0900 Subject: Web/JavaScript/Guide を更新 (#1260) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - conflicting 版を英語版に準じてリダイレクトに変更 - 2021/05/22 時点の英語版に同期 --- files/ja/_redirects.txt | 16 +-- files/ja/_wikihistory.json | 16 --- .../ja/conflicting/web/javascript/guide/index.html | 45 -------- .../index.html | 11 -- files/ja/web/javascript/guide/index.html | 128 ++++++++++----------- 5 files changed, 72 insertions(+), 144 deletions(-) delete mode 100644 files/ja/conflicting/web/javascript/guide/index.html delete mode 100644 files/ja/conflicting/web/javascript/guide_552be6201ec831852573aad295c96538/index.html diff --git a/files/ja/_redirects.txt b/files/ja/_redirects.txt index c796f25e7e..f4ce9ad9c7 100644 --- a/files/ja/_redirects.txt +++ b/files/ja/_redirects.txt @@ -718,7 +718,7 @@ /ja/docs/Core_JavaScript_1.5_Guide/Objects_and_Properties /ja/docs/orphaned/Web/JavaScript/Guide/Objects_and_Properties /ja/docs/Core_JavaScript_1.5_Guide/Operators/Assignment_Operators /ja/docs/Web/JavaScript/Guide/Expressions_and_Operators#assignment_operators /ja/docs/Core_JavaScript_1.5_Guide/Predefined_Core_Objects /ja/docs/Web/JavaScript/Guide -/ja/docs/Core_JavaScript_1.5_Guide/Predefined_Core_Objects/Function_Object /ja/docs/conflicting/Web/JavaScript/Guide +/ja/docs/Core_JavaScript_1.5_Guide/Predefined_Core_Objects/Function_Object /ja/docs/Web/JavaScript/Guide /ja/docs/Core_JavaScript_1.5_Guide/Predefined_Functions /ja/docs/orphaned/Web/JavaScript/Guide/Predefined_Functions /ja/docs/Core_JavaScript_1.5_Guide/Predefined_Functions/escape_and_unescape_Functions /ja/docs/orphaned/Web/JavaScript/Guide/Predefined_Functions/escape_and_unescape_Functions /ja/docs/Core_JavaScript_1.5_Guide/Predefined_Functions/eval_Function /ja/docs/orphaned/Web/JavaScript/Guide/Predefined_Functions/eval_Function @@ -764,7 +764,7 @@ /ja/docs/Core_JavaScript_1.5_Guide:Objects_and_Properties /ja/docs/orphaned/Web/JavaScript/Guide/Objects_and_Properties /ja/docs/Core_JavaScript_1.5_Guide:Operators:Assignment_Operators /ja/docs/Web/JavaScript/Guide/Expressions_and_Operators#assignment_operators /ja/docs/Core_JavaScript_1.5_Guide:Predefined_Core_Objects /ja/docs/Web/JavaScript/Guide -/ja/docs/Core_JavaScript_1.5_Guide:Predefined_Core_Objects:Function_Object /ja/docs/conflicting/Web/JavaScript/Guide +/ja/docs/Core_JavaScript_1.5_Guide:Predefined_Core_Objects:Function_Object /ja/docs/Web/JavaScript/Guide /ja/docs/Core_JavaScript_1.5_Guide:Predefined_Functions /ja/docs/orphaned/Web/JavaScript/Guide/Predefined_Functions /ja/docs/Core_JavaScript_1.5_Guide:Predefined_Functions:escape_and_unescape_Functions /ja/docs/orphaned/Web/JavaScript/Guide/Predefined_Functions/escape_and_unescape_Functions /ja/docs/Core_JavaScript_1.5_Guide:Predefined_Functions:eval_Function /ja/docs/orphaned/Web/JavaScript/Guide/Predefined_Functions/eval_Function @@ -2671,7 +2671,7 @@ /ja/docs/JavaScript/Guide/Operators/Assignment_Operators /ja/docs/Web/JavaScript/Guide/Expressions_and_Operators#assignment_operators /ja/docs/JavaScript/Guide/Operators/Assignment_Operators-redirect-1 /ja/docs/Web/JavaScript/Guide/Expressions_and_Operators#assignment_operators /ja/docs/JavaScript/Guide/Predefined_Core_Objects /ja/docs/Web/JavaScript/Guide -/ja/docs/JavaScript/Guide/Predefined_Core_Objects/Function_Object /ja/docs/conflicting/Web/JavaScript/Guide +/ja/docs/JavaScript/Guide/Predefined_Core_Objects/Function_Object /ja/docs/Web/JavaScript/Guide /ja/docs/JavaScript/Guide/Predefined_Functions /ja/docs/orphaned/Web/JavaScript/Guide/Predefined_Functions /ja/docs/JavaScript/Guide/Predefined_Functions-redirect-1 /ja/docs/orphaned/Web/JavaScript/Guide/Predefined_Functions /ja/docs/JavaScript/Guide/Predefined_Functions/escape_and_unescape_Functions /ja/docs/orphaned/Web/JavaScript/Guide/Predefined_Functions/escape_and_unescape_Functions @@ -4822,12 +4822,12 @@ /ja/docs/Web/JavaScript/Guide/Loop_Statements/while_Statement /ja/docs/orphaned/Web/JavaScript/Guide/Loop_Statements/while_Statement /ja/docs/Web/JavaScript/Guide/Object_Manipulation_Statements /ja/docs/orphaned/Web/JavaScript/Guide/Object_Manipulation_Statements /ja/docs/Web/JavaScript/Guide/Objects_and_Properties /ja/docs/orphaned/Web/JavaScript/Guide/Objects_and_Properties -/ja/docs/Web/JavaScript/Guide/Obsolete_Pages /ja/docs/conflicting/Web/JavaScript/Guide_552be6201ec831852573aad295c96538 +/ja/docs/Web/JavaScript/Guide/Obsolete_Pages /ja/docs/Web/JavaScript/Guide /ja/docs/Web/JavaScript/Guide/Obsolete_Pages/Predefined_Core_Objects /ja/docs/Web/JavaScript/Guide -/ja/docs/Web/JavaScript/Guide/Obsolete_Pages/Predefined_Core_Objects/Function_Object /ja/docs/conflicting/Web/JavaScript/Guide -/ja/docs/Web/JavaScript/Guide/Obsolete_Pages2 /ja/docs/conflicting/Web/JavaScript/Guide_552be6201ec831852573aad295c96538 +/ja/docs/Web/JavaScript/Guide/Obsolete_Pages/Predefined_Core_Objects/Function_Object /ja/docs/Web/JavaScript/Guide +/ja/docs/Web/JavaScript/Guide/Obsolete_Pages2 /ja/docs/Web/JavaScript/Guide /ja/docs/Web/JavaScript/Guide/Obsolete_Pages2/Predefined_Core_Objects /ja/docs/Web/JavaScript/Guide -/ja/docs/Web/JavaScript/Guide/Obsolete_Pages2/Predefined_Core_Objects/Function_Object /ja/docs/conflicting/Web/JavaScript/Guide +/ja/docs/Web/JavaScript/Guide/Obsolete_Pages2/Predefined_Core_Objects/Function_Object /ja/docs/Web/JavaScript/Guide /ja/docs/Web/JavaScript/Guide/Operators /ja/docs/Web/JavaScript/Guide/Expressions_and_Operators /ja/docs/Web/JavaScript/Guide/Operators/Arithmetic_Operators /ja/docs/Web/JavaScript/Guide/Expressions_and_Operators#arithmetic_operators /ja/docs/Web/JavaScript/Guide/Operators/Assignment_Operators /ja/docs/Web/JavaScript/Guide/Expressions_and_Operators#assignment_operators @@ -4836,7 +4836,7 @@ /ja/docs/Web/JavaScript/Guide/Operators/Special_Operators /ja/docs/Web/JavaScript/Guide/Expressions_and_Operators#conditional_ternary_operator /ja/docs/Web/JavaScript/Guide/Operators/String_Operators /ja/docs/Web/JavaScript/Guide/Expressions_and_Operators#string_operators /ja/docs/Web/JavaScript/Guide/Predefined_Core_Objects /ja/docs/Web/JavaScript/Guide -/ja/docs/Web/JavaScript/Guide/Predefined_Core_Objects/Function_Object /ja/docs/conflicting/Web/JavaScript/Guide +/ja/docs/Web/JavaScript/Guide/Predefined_Core_Objects/Function_Object /ja/docs/Web/JavaScript/Guide /ja/docs/Web/JavaScript/Guide/Predefined_Functions /ja/docs/orphaned/Web/JavaScript/Guide/Predefined_Functions /ja/docs/Web/JavaScript/Guide/Predefined_Functions/escape_and_unescape_Functions /ja/docs/orphaned/Web/JavaScript/Guide/Predefined_Functions/escape_and_unescape_Functions /ja/docs/Web/JavaScript/Guide/Predefined_Functions/eval_Function /ja/docs/orphaned/Web/JavaScript/Guide/Predefined_Functions/eval_Function diff --git a/files/ja/_wikihistory.json b/files/ja/_wikihistory.json index 2e9e9b0bf8..f75dab2def 100644 --- a/files/ja/_wikihistory.json +++ b/files/ja/_wikihistory.json @@ -49070,22 +49070,6 @@ "RobinEgg" ] }, - "conflicting/Web/JavaScript/Guide": { - "modified": "2019-03-24T00:01:12.633Z", - "contributors": [ - "teoli", - "ethertank", - "happysadman", - "Mgjbot", - "electrolysis" - ] - }, - "conflicting/Web/JavaScript/Guide_552be6201ec831852573aad295c96538": { - "modified": "2019-03-23T23:28:49.183Z", - "contributors": [ - "ethertank" - ] - }, "conflicting/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat": { "modified": "2020-10-15T21:36:10.939Z", "contributors": [ diff --git a/files/ja/conflicting/web/javascript/guide/index.html b/files/ja/conflicting/web/javascript/guide/index.html deleted file mode 100644 index 6de176b7ab..0000000000 --- a/files/ja/conflicting/web/javascript/guide/index.html +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: Function Object -slug: conflicting/Web/JavaScript/Guide -original_slug: Web/JavaScript/Guide/Obsolete_Pages/Predefined_Core_Objects/Function_Object ---- -

 

-

Function オブジェクト

-

定義済みの Function オブジェクトは、関数としてコンパイルさせたい JavaScript コードの文字列を指定します。

-

Function オブジェクトを作成するには次のようにします。

-
functionObjectName = new Function ([arg1, arg2, ... argn], functionBody)
-
-

functionObjectName は変数名または既存のオブジェクトのプロパティ名です。オブジェクトに小文字のイベントハンドラ名を続けて、window.onerror のようにして指定することもできます。

-

arg1, arg2, ... argn は関数が仮引数名として使用する引数です。それぞれが JavaScript の識別子として妥当な文字列である必要があります。例えば、"x" や "theForm" などです。

-

functionBody は関数の本体としてコンパイルさせたい JavaScript コードを表す文字列です。

-

Function オブジェクトはそれが使用されるたびに評価されます。これは関数を宣言し、それをコード内で呼び出す方法よりも非効率的です。宣言された関数はコンパイルされるからです。

-

ここで説明した関数の定義方法に加えて、function 文と関数式を用いることもできます。詳しくは コア JavaScript 1.5 リファレンス を参照してください。

-

次のコードは関数を変数 setBGColor に代入します。この関数は開いている文書の背景色をセットします。

-
var setBGColor = new Function("document.bgColor='antiquewhite'")
-
-

Function オブジェクトを呼び出すには、それがあたかも関数であるかのように変数名を指定すればいいのです。次のコードは setBGColor 変数で指定された関数を実行します。

-
var colorChoice="antiquewhite"
-if (colorChoice=="antiquewhite") {setBGColor()}
-
-

次のどちらかの方法を使用することでイベントハンドラに関数を代入することができます。

-
1. document.form1.colorButton.onclick=setBGColor
-2. <INPUT NAME="colorButton" TYPE="button"
-      VALUE="Change background color"
-      onClick="setBGColor()">
-
-

上記の変数 setBGColor を作成することは次の関数を宣言することと同じようなことです。

-
function setBGColor() {
-   document.bgColor='antiquewhite'
-}
-
-

関数を変数に代入することは関数を宣言することと似ていますが、異なる点もあります。

- -

関数を関数の中に入れ子にすることができます。内側の関数は外側の関数に対してプライベートになります。

- -

{{ PreviousNext("Core_JavaScript_1.5_Guide:Predefined_Core_Objects:Date_Object", "Core_JavaScript_1.5_Guide:Predefined_Core_Objects:Math_Object") }}

diff --git a/files/ja/conflicting/web/javascript/guide_552be6201ec831852573aad295c96538/index.html b/files/ja/conflicting/web/javascript/guide_552be6201ec831852573aad295c96538/index.html deleted file mode 100644 index c058e41066..0000000000 --- a/files/ja/conflicting/web/javascript/guide_552be6201ec831852573aad295c96538/index.html +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Obsolete Pages -slug: conflicting/Web/JavaScript/Guide_552be6201ec831852573aad295c96538 -translation_of: Web/JavaScript/Guide -translation_of_original: Web/JavaScript/Guide/Obsolete_Pages -original_slug: Web/JavaScript/Guide/Obsolete_Pages ---- -

This is a list of pages that have been merged into chapters (in alphabetical order):

- - -
{{tree}}
diff --git a/files/ja/web/javascript/guide/index.html b/files/ja/web/javascript/guide/index.html index 9e89757ae6..3a9657f5bf 100644 --- a/files/ja/web/javascript/guide/index.html +++ b/files/ja/web/javascript/guide/index.html @@ -4,7 +4,7 @@ slug: Web/JavaScript/Guide tags: - Guide - JavaScript - - 'l10n:priority' + - l10n:priority - ガイド translation_of: Web/JavaScript/Guide --- @@ -19,26 +19,26 @@ translation_of: Web/JavaScript/Guide