Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

html popup form


<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>
 
PREVIOUS NEXT
Tagged: #html #popup #form
ADD COMMENT
Topic
Name
8+6 =