Answers for "input text alert javascript"

2

alert input js

var person = prompt("Please enter your name", "Harry Potter");
Posted by: Guest on August-10-2021
1

javascript alert get text

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

if (person == null || person == "") {
  txt = "User cancelled the prompt.";
} else {
  txt = "Hello " + person + "! How are you today?";
}
Posted by: Guest on April-24-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language