alert() method examples in JavaScript

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);
Check out Best Alternative to InfoPath -> Try Now


New to Office 365 SharePoint Online? Get Office 365 Enterprise E3 Subscription & Try out all the features

(Installation & Features)

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 →