1 <!DOCTYPE html>
2 <html lang="ru">
3 <head>
<title>Мой сайт с JS</title>
5 </head>
6 <body>
7
8
<input type="text" id="nameInput">
9
10
11
12
13
14
15
16
17
<button onclick="showName()">Показать имя </button>
<p id="result"></p>
<script>
function showName()
let name = document.getElementById("name Input").value;
document.getElementById("result").innerText = "Привет, "+ name;
18
19
</script>