function
funMake() {
document.getElementById(
'p2'
).innerHTML =
'To be or not to be?'
;
}
window.onload =
() {
for
(
var
i=1; i<=2; i++) {
'd1'
).innerHTML += document.getElementById(
'p'
+i).innerHTML +
'<br />'
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
script
src
"js/script.js"
></
</
body
p
id
"p1"
>Hello World!</
"p2"
div
"d1"
funMake();