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>
関連記事
- previousSibling
- parentNode
- lastChild
- item
- insertBefore
- hasChildNodes
- getElementsByTagName
- getElementsByName
- getElementById
- firstChild
- createTextNode
- document.createElement
- cloneNode
- childNodes
- appendChild
スポンサーリンク





