SYNCERのロゴ
アイキャッチ画像

Document.head - head要素

headは、Documentのプロパティです。ドキュメントのhead要素を返します。

概要

名前
head
所属
Document
IDL
readonly attribute HTMLHeadElement? head;
仕様書
https://html.spec.whatwg.org/multipage/dom.html#dom-document-head

説明

head要素を返す。読み取り専用なので、値を代入して変更することはできない。

デモ

Document.headのデモです。

<!-- このコードは編集できます。 -->

<!DOCTYPE html>
<html>
<head>
	<title>SYNCER</title>
</head>
<body>
<script>
var value = document.head ;

console.log( value ) ;
document.body.appendChild( new Text( value ) ) ;
</script>
</body>
</html>

サポート状況

ChromeFirefoxSafariEdgeIEOperaiOS SafariAndroid
5.1+ 9+
  • Twitterでシェア
  • Facebookでシェア
  • Google+でシェア
  • はてなブックマークでシェア
  • pocketに保存
  • LINEでシェア
更新履歴
2017年10月6日 (金)
コンテンツを公開しました。