javascript get next element
snippet in javascript

javascript get next element

user3886

var x = document.getElementById("item1").nextElementSibling;

next sibling js

user3132


 var x = document.getElementById("item1").nextSibling.innerHTML;