Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Here is the instructions I mplement each buttons functionality (use getElementById): 1)Enter Name -> User should enter his/her name. 2)Enter Age -> User should enter

Here is the instructions

Implement each buttons functionality (use getElementById):

1)Enter Name -> User should enter his/her name.

2)Enter Age -> User should enter his/her age.

3) Display Message -> Hello my name is __, I'm __ years old. It is nice to meet you!

BELOW IS THE CODE THAT I HAVE DONE SO FAR. I CANNOT GET NUMBER 3) IT IS COMING BACK UNDEFINED. PLEASE HELP

Warming up!

This is where name will go...

This is where age will go...

This is where message will go...

function yourname(){

var namey = prompt ("Please enter your name");

document.getElementById('name').innerHTML = namey;}

function ageless(){

var ageit = prompt("Please enter your age");

document.getElementById('age').innerHTML=ageit;}

function displaymessage(){

var namey = document.getElementById('name').value;

var ageit = document.getElementById('age').value;

document.getElementById("msg").innerHTML = "Hello my name is "+ namey+ ", I'm "+ ageit + "years old. It is nice to meet you!";

}

image text in transcribed

123456789101112131415161718192021222324252627301

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

More Books

Students also viewed these Databases questions

Question

=+j Describe the various support services delivered by IHR.

Answered: 1 week ago