Write a statement that displays an alert box which looks like this :
Answers
Explanation:
The alert() method displays an alert box with a specified message and an OK button. An alert box is often used if you want to make sure information comes through to the user. Note: The alert box takes the focus away from the current window, and forces the browser to read the message.
The Code is given below.
Explanation:
The word ‘window’ is optional below. The tag \n is used for creating line breaks. There are two ways in which we can display an alert box.
The alert box mentioned in the picture contains the statements Jai Jawan, Jai Kisan and Jai Vigyan in separate lines.
The statement for creating such an alert box is given below:
window.alert (“Jai Jawan\n Jai Kisan\n Jai Vigyan ”);
It can also be written as:
alert (“Jai Jawan\n Jai Kisan\n Jai Vigyan ”);