From 6ef1fa4618e08426b874529619a66adbd3d1fcf0 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:07:59 +0100 Subject: unslug ja: move --- .../web/api/globaleventhandlers/onreset/index.html | 57 ++++++++++++++++ .../api/globaleventhandlers/onresize/index.html | 78 ++++++++++++++++++++++ .../onselectionchange/index.html | 62 +++++++++++++++++ 3 files changed, 197 insertions(+) create mode 100644 files/ja/web/api/globaleventhandlers/onreset/index.html create mode 100644 files/ja/web/api/globaleventhandlers/onresize/index.html create mode 100644 files/ja/web/api/globaleventhandlers/onselectionchange/index.html (limited to 'files/ja/web/api/globaleventhandlers') diff --git a/files/ja/web/api/globaleventhandlers/onreset/index.html b/files/ja/web/api/globaleventhandlers/onreset/index.html new file mode 100644 index 0000000000..c9862667e8 --- /dev/null +++ b/files/ja/web/api/globaleventhandlers/onreset/index.html @@ -0,0 +1,57 @@ +--- +title: window.onreset +slug: Web/API/Window/onreset +tags: + - DOM + - Gecko + - Gecko DOM Reference + - Window +translation_of: Web/API/GlobalEventHandlers/onreset +--- +
+ {{ApiRef}}
+

概要

+

フォームの reset イベントに対応するイベントハンドラです。

+

構文

+
window.onreset = funcRef;
+
+

引数

+ +

+
<!DOCTYPE html>
+<html lang="ja">
+<head>
+<meta charset="UTF-8" />
+<title>onreset のテスト</title>
+
+<script>
+function reg() {
+  window.onreset = hit;
+}
+
+function hit() {
+ alert('リセットイベントが発生しました。');
+}
+</script>
+
+</head>
+<body onload="reg();">
+
+<form>
+  <div>
+    <textarea></textarea>
+  </div>
+  <div>
+    <input type="reset" value="reset" />
+  </div>
+</form>
+
+</body>
+</html>
+
+

注記

+

reset イベントは、ユーザがフォーム内のリセットボタン (<input type="reset"/>) をクリックした際に発生します。

+

仕様

+

標準仕様書には含まれていません。

diff --git a/files/ja/web/api/globaleventhandlers/onresize/index.html b/files/ja/web/api/globaleventhandlers/onresize/index.html new file mode 100644 index 0000000000..db2b2bbae9 --- /dev/null +++ b/files/ja/web/api/globaleventhandlers/onresize/index.html @@ -0,0 +1,78 @@ +--- +title: window.onresize +slug: Web/API/Window/onresize +tags: + - DOM + - Gecko + - Property + - Window +translation_of: Web/API/GlobalEventHandlers/onresize +--- +

{{ ApiRef() }}

+ +

GlobalEventHandlers.onresize プロパティは、{{event("resize")}} イベントを受信するとトリガーされる {{domxref("EventHandler")}} を含みます。

+ +

構文

+ +
window.onresize = funcRef;
+
+ +

引数

+ + + +

+ +
window.onresize = doFunc;
+
+ +
<html>
+<head>
+
+<title>onresize test</title>
+
+</head>
+
+<body>
+<p>Resize the browser window to fire the resize event.</p>
+
+<p>Window height: <span id="height"></span></p>
+<p>Window width: <span id="width"></span></p>
+
+<script type="text/javascript">
+  var heightOutput = document.querySelector('#height');
+  var widthOutput = document.querySelector('#width');
+
+  function resize() {
+    heightOutput.textContent = window.innerHeight;
+    widthOutput.textContent = window.innerWidth;
+  }
+
+  window.onresize = resize;
+</script>
+</body>
+</html>
+
+ +

注記

+ +

ブラウザウィンドウのサイズが変更された後に resize イベントが発生します。

+ +

仕様

+ + + + + + + + + + + + + + +
使用ステータスコメント
{{SpecName('HTML WHATWG','webappapis.html#handler-onresize','onresize')}}{{Spec2('HTML WHATWG')}} 
diff --git a/files/ja/web/api/globaleventhandlers/onselectionchange/index.html b/files/ja/web/api/globaleventhandlers/onselectionchange/index.html new file mode 100644 index 0000000000..9793bde3fa --- /dev/null +++ b/files/ja/web/api/globaleventhandlers/onselectionchange/index.html @@ -0,0 +1,62 @@ +--- +title: Document.onselectionchange +slug: Web/API/Document/onselectionchange +tags: + - API + - Document + - Experimental + - Reference + - イベントハンドラー + - プロパティ +translation_of: Web/API/GlobalEventHandlers/onselectionchange +translation_of_original: Web/API/Document/onselectionchange +--- +
{{ApiRef('DOM')}}{{SeeCompatTable}}
+ +

Document.onselectionchange プロパティは、 {{event("selectionchange")}} イベントがこのオブジェクトに到達したときに呼び出されるイベントハンドラーを表します。

+ +

構文

+ +
obj.onselectionchange = function;
+
+ + + +

+ +
document.onselectionchange = function() { console.log("Selection changed!"); };
+
+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('Selection API','','Document.onselectionchange')}}{{Spec2('Selection API')}}初回定義
+ +

ブラウザーの対応

+ + + +

{{Compat("api.Document.onselectionchange")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf