alert() method examples in JavaScript

Sign up for an Office 365 SharePoint Online Business Subscription

In this post, we will discuss some examples of alert() method in javascript. Also, you can also check out my previous posts on:
Below are some examples:
 <script language=”JavaScript” type=”text/javascript”>
        alert(“Javascript dialog example”);
In this example, we can see how we can show a message in the dialog box in multiple lines.
<script language=”JavaScript” type=”text/javascript”>
        alert(“JavaScript Alert\n Multiple Line Example”);
In this example, we will see how we can show message from variables in a dialog box.
 <script language=”JavaScript” type=”text/javascript”>
        var firstmsg = “This is the first message! “;
        var secondmsg = “This is the second message! “;
        alert(firstmsg + secondmsg);

You May Also like the Following SharePoint Online Tutorials:

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site

View all posts by Bijay Kumar →