Answers for "how to give prompt in javascript"

8

js get input from user

var name = prompt("Please enter your name", "Harry Potter");
Posted by: Guest on December-01-2020
3

javascript prompt

var person = prompt("Please enter your name", "Harry Potter");

if (person != null) {
  document.getElementById("demo").innerHTML =
  "Hello " + person + "! How are you today?";
}
Posted by: Guest on July-29-2020

Code answers related to "how to give prompt in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language