We are providing online training of realtime Live project on Asp.Net MVC with Angular and Web API. For more information click here. If you have any query then drop the messase in CONTACT FORM

Monday, June 22, 2015

Create html page and display the numbers 0 to 5 using for loop in javascript function.


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
    <body>
    <form id="form1" runat="server">
    <div>
    <script type="text/javascript">
        var i = 0;
        for(i=0;i<=5;i++)
             {
            document.write("The number is: " + "<b>" +i + "</b>");
            document.write("<br/>");
        }
    </script>
    </div>

    </form>

OUTPUT:



No comments: