nextSibling

次のノードを示します。

構文

オブジェクト.nextSibling

例文

<html>
 <head>
  <title>nextSibling</title>
  <script type="text/javascript"><!--
  window.onload = function () {
   var sObj = document.getElementById("subBlock").nextSibling;
   document.getElementById("result").innerHTML = sObj.nodeValue;
  }
  // --></script>
 </head>
 <body>
 <div id="result"></div>
 <div id="subBlock">sample</div>
 </body>
</html>

関連記事

スポンサーリンク

CD-RやDVD-Rを使わずUSBメモリでLinuxをインストールする方法(ISO boot)

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る