How make a form pop up html

Code examples

0
0


<html>
<body>


<p>Here we use the prompt() method for Popup Forms</p>

<button onclick="popupfunction()">Click</button>

<p id="popup"></p>

<script>
function popupfunction() {
  let person = prompt("Please enter your name", "");
  if (person != null) {
    document.getElementById("popup").innerHTML =
    "Hello " + person + "!";
  }
}
</script>

</body>
</html>

Similar pages

Similar pages with examples

In other languages

This page is in other languages

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................