Computer Science, asked by pradeepkumar905071, 4 days ago

write a program to Display a welcome message using javascript....


it is necessary to , plz answer it.
.​

Answers

Answered by khatoonnasni
11

Explanation:

Actually, HTML5 does add some smarts to HTML—including basic form validation. But because not all browsers support these nifty additions (and because you can do a whole lot more with forms and JavaScript), you still need JavaScript to build the best, most user-friendly and interactive forms. You can learn more about HTML5 and web forms in Ben Henick’s HTML5 Forms (O’Reilly) and Gaurav Gupta’s Mastering HTML5 Forms (Packt Publishing).

Answered by mahinderjeetkaur878
0

Answer: - We need to write a program to display a welcome message using JavaScript. The program is written below.

The program in Java: -

var x;

var name = prompt("Please enter your Name and Surname" - " ");

var gender;

var male;

var female;

if (gender == male)

{

   alert("Welcome, Mr. " + name);

}

else if (gender == female)

{

   alert("Welcome, Ms. " + name);

}

  • Suppose if we enter the name as well as the surname as "Ravi Shastri", then the program written above will execute the first if loop and will give the output of the program as: -

Welcome, Mr. Ravi Shastri

And,

  • If we enter the name as well as the surname as "Devyani Mondal", then the program written above will not execute the first if loop and will jump to the second if loop given in the program and will give the output of the program as: -

Welcome, Ms. Devyani Mondal

To know more about the topic, visit the below links: -

https://brainly.in/question/31655938

https://brainly.in/question/8809216

#SPJ3

Similar questions