About 25,700,000 results
Open links in new tab
  1. JavaScript Program to Print Your Own Name - GeeksforGeeks

    Jan 17, 2025 · We can print a user's name in JavaScript using methods like alert (), console.log (), document.write (),document.getElementById (). Each method serves a specific purpose …

  2. javascript - Prompt to enter name into input - Stack Overflow

    Apr 17, 2019 · I'm planning to create a JavaScript prompt where you can enter your name and it will go to the 's value. How can I make the code work? I tried the below code but it seems it …

  3. JavaScript Output - W3Schools

    JavaScript can "display" data in different ways: Writing into an HTML element, using innerHTML or innerText. Writing into the HTML output using document.write(). Writing into an alert box, …

  4. Write a HTML code to display your name. - Techyv.com

    var name=prompt("Please enter your name","Harry"); In here we assigned the value that returns from the prompt box to variable name. So now we completed the 1st step.

  5. User Input and Output in JavaScript - UniversalClass

    JavaScript has a few window object methods that you can use to interact with your users. The prompt () method lets you open a client-side window and take input from a user. For instance, …

  6. How to Get User Input in JavaScript - automateNow

    Jun 7, 2024 · In this example, we use let to create a userInput variable, which stores what the user enters in a prompt. The prompt() method uses two parameters. The first displays a …

  7. JavaScript-Make a program to display your name! - YouTube

    In this video, the name of a person is accepted. When the name is given, the variable stores the value of your name and displays it with the highest value,i....

  8. ask user enter name with Javascript and html - Stack Overflow

    May 8, 2025 · I have code to ask the user to enter their name and display it in a <p> element function my() { var x = document.getElementById("tt").textContent; …

  9. How to take user input in JavaScript? - GeeksforGeeks

    Aug 13, 2024 · // JavaScript code to take input from the user, // using the prompt function, with a display message. const userInput = prompt ("Please enter your name:");

  10. Window prompt() Method - W3Schools

    Prompt for a user name and output a message: "Hello " + person + "! How are you today?"; More examples below. The prompt() method displays a dialog box that prompts the user for input. …

Refresh