ou are going to add some javascript to your webpage to greet the user. All the below instructions can be found with further explanations in the Javascript lectures.   If you do not already have them, add two title tags so they display at the top of your webpage The first tag should have the contents: “Welcome” The second tag should have an id='username' and contents: “Placeholder” All Javascript must go in a file with the extension “.js”, such as “main.js” or “script.js”. Create a file to hold your javascript if one is not already there. Add a script tag at the end of your body tag that includes your javascript file. In your script tag, use the javascript prompt command to save input from the user into a variable Ask the user their name in the prompt command You can name the variable whatever you like  Change the second contents to the name entered by the user  it should be stored in the variable you created

Microsoft Windows 10 Comprehensive 2019
1st Edition
ISBN:9780357392607
Author:FREUND
Publisher:FREUND
Chapter8: Mastering Digital Media
Section: Chapter Questions
Problem 2AYK
icon
Related questions
Question

Javascript

 

You are going to add some javascript to your webpage to greet the user. All the below instructions can be found with further explanations in the Javascript lectures.

 

  1. If you do not already have them, add two <h1> title tags so they display at the top of your webpage
    1. The first tag should have the contents: “Welcome”
    2. The second tag should have an id='username' and contents: “Placeholder”
  2. All Javascript must go in a file with the extension “.js”, such as “main.js” or “script.js”. Create a file to hold your javascript if one is not already there.
  3. Add a script tag at the end of your body tag that includes your javascript file.
  4. In your script tag, use the javascript prompt command to save input from the user into a variable
    1. Ask the user their name in the prompt command
    2. You can name the variable whatever you like 
  5. Change the second <h1 id=’username’> contents to the name entered by the user 
    1. it should be stored in the variable you created

 

Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Java
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Windows 10 Comprehensive 2019
Microsoft Windows 10 Comprehensive 2019
Computer Science
ISBN:
9780357392607
Author:
FREUND
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L