JavaScript > Introduction

Show Alert in JavaScript

How to show an alert to the user in JavaScript?

In case we want to alert the user with some information, alert method/function can be used.

      alert("I am alert.");

Above code snippet shall give “I am alert” alert to the user as displayed in the picture below.


If you want alert messages to display in multiple line, you can separate the messages with “\n”.

 Views: 4870 | Post Order: 4

Write for us

Hosting Recommendations