function
funChange() {
if
(document.getElementsByName(
'txt1'
)[0].innerHTML ==
'Hello World!'
&& document.getElementsByName(
'txt2'
'Привет Мир!'
) {
document.getElementsByName(
)[0].innerHTML =
;
}
else
{
window.onload =
() {
document.getElementById(
'b1'
).onclick = funChange;
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
script
src
"js/script.js"
></
</
body
p
name
"txt1"
>Hello World!</
"txt2"
>Привет Мир!</
br
input
id
"b1"
type
"button"
value
"change"