function
funMake() {
var
ara = document.getElementById(
'd1'
).childNodes;
val = document.getElementById(
'd2'
);
for
(
i=0; i<ara.length; i++) {
if
(i%2 !=0) {
val.innerHTML +=
'<h3>'
+ ara[i].nodeName +
'</h3>'
}
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
script
src
"js/script.js"
></
</
body
div
id
"d1"
p
>Hello World!</
h4
>Привет Мир!</
>To be or not to be?</
"d2"
funMake();