function
funMake() {
document.body.childNodes[2].id =
'p3'
;
}
window.onload =
() {
for
(
var
i=1; i<=3; i++) {
document.getElementById(
'd1'
).innerHTML +=
'<h3>'
+ document.body.childNodes[i].id +
'</h3>'
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
script
src
"js/script.js"
></
</
body
p
id
"p1"
>Hello World!</
"p2"
>Привет Мир!</
>To be or not to be?</
div
"d1"
funMake();