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 an alert message using javascipt function with an argument.


<!DOCTYPE html>
<html >
<head >
    <title></title>
    <script type="text/javascript">
        function myfunction(txt)
        {
            alert(txt);
        }
    </script>
</head>
    <body>
    <form id="form1" runat="server">
    <div>
    <input type="button" onclick="myfunction('Good Morning')" value="In the Morning" />
        <input type="button" onclick="myfunction('Good Evening')" value="In the Evening" />
    </div>
    </form>
</body>

</html>

Output:

No comments: