📖
training
  • index
  • CSS
  • JavaScript
    • DOM イベント
    • document.write
    • window.alert
    • console.log
    • ステートメント
    • データ型
    • for
    • オブジェクト
    • リテラル
    • 変数
    • 宣言
    • スコープ
    • 型変換
    • 配列
    • Strictモード
    • 演算子
    • if
    • switch
    • 繰り返し
    • for
    • for...in
    • for...of
    • for await...of
    • while
    • do...while
    • 関数
    • Element インターフェイス
    • Documentインターフェイス
GitBook提供
このページ内
  • メソッド
  • プロパティ

役に立ちましたか?

  1. JavaScript

Documentインターフェイス

ブラウザーに読み込まれたウェブページを表し、 DOM ツリーであるウェブページのコンテンツへのエントリーポイントとして働きます。 DOM ツリーは <body> や <table> など、多数の要素を持ちます。これはページの URL を取得したり文書で新たな要素を作成するなど、文書全体に関わる機能を提供します。

メソッド

代表的なメソッド

メソッド

説明

getElementById

id属性の値を指定して、HTML要素を取得します

querySelector

CSSのセレクタ表記を指定して、HTML要素を取得します 複数が対象となった場合は、最初に見つかったもののみ取得されます

getElementsByName

name属性の値を指定して、HTML要素群を取得します

getElementsByClassName

class属性の値を指定して、HTML要素群を取得します

getElementsByTagName

HTML要素名を指定して、HTML要素群を取得します

querySelectorAll

CSSのセレクタ表記を指定して、HTML要素群を取得します

Documentのメソッド

  • after

  • animate

  • append

  • attachShadow

  • before

  • closest

  • computedStyleMap

  • createShadowRoot

  • getAnimations

  • getAttribute

  • getAttributeNames

  • getAttributeNode

  • getAttributeNodeNS

  • getAttributeNS

  • getBoundingClientRect

  • getClientRects

  • getElementsByClassName

  • getElementsByTagName

  • getElementsByTagNameNS

  • hasAttribute

  • hasAttributeNS

  • hasAttributes

  • hasPointerCapture

  • insertAdjacentElement

  • insertAdjacentHTML

  • insertAdjacentText

  • matches

  • msZoomTo

  • prepend

  • querySelector

  • querySelector

  • querySelectorAll

  • querySelectorAll

  • releasePointerCapture

  • remove

  • removeAttribute

  • removeAttributeNode

  • removeAttributeNS

  • replaceWith

  • requestFullscreen

  • requestPointerLock

  • scroll

  • scrollBy

  • scrollIntoView

  • scrollIntoViewIfNeeded

  • scrollTo

  • setAttribute

  • setAttributeNode

  • setAttributeNodeNS

  • setAttributeNS

  • setCapture

  • setPointerCapture

  • toggleAttribute

プロパティ

  • alinkColor

  • all

  • anchors

  • applets

  • bgColor

  • body

  • characterSet

  • childElementCount

  • children

  • compatMode

  • contentType

  • currentScript

  • defaultView

  • designMode

  • dir

  • doctype

  • documentElement

  • documentURI

  • documentURIObject

  • domain

  • domConfig

  • embeds

  • fgColor

  • firstElementChild

  • forms

  • fullscreen

  • fullscreenEnabled

  • head

  • hidden

  • images

  • implementation

  • lastElementChild

  • lastModified

  • lastStyleSheetSet

  • linkColor

  • links

  • location

  • mozSyntheticDocument

  • onabort

  • onafterscriptexecute

  • onanimationcancel

  • onanimationend

  • onanimationiteration

  • onauxclick

  • onbeforescriptexecute

  • onblur

  • oncancel

  • oncanplay

  • oncanplaythrough

  • onchange

  • onclick

  • onclose

  • oncontextmenu

  • oncuechange

  • ondblclick

  • ondurationchange

  • onended

  • onerror

  • onfocus

  • onformdata

  • onfullscreenchange

  • onfullscreenerror

  • ongotpointercapture

  • oninput

  • oninvalid

  • onkeydown

  • onkeypress

  • onkeyup

  • onload

  • onloadeddata

  • onloadedmetadata

  • onloadend

  • onloadstart

  • onlostpointercapture

  • onmousedown

  • onmouseenter

  • onmouseleave

  • onmousemove

  • onmouseout

  • onmouseover

  • onmouseup

  • onoffline

  • ononline

  • onpause

  • onplay

  • onpointercancel

  • onpointerdown

  • onpointerenter

  • onpointerleave

  • onpointermove

  • onpointerout

  • onpointerover

  • onpointerup

  • onreset

  • onresize

  • onscroll

  • onselect

  • onselectionchange

  • onselectstart

  • onsubmit

  • ontouchcancel

  • ontouchstart

  • ontransitioncancel

  • ontransitionend

  • onvisibilitychange

  • onwheel

  • origin

  • plugins

  • popupNode

  • preferredStyleSheetSet

  • readyState

  • referrer

  • scripts

  • scrollingElement

  • selectedStyleSheetSet

  • styleSheetSets

  • timeline

  • title

  • tooltipNode

  • URL

  • visibilityState

  • width

  • xmlEncoding

  • xmlVersion

前へElement インターフェイス

最終更新 5 年前

役に立ちましたか?