Friday, 5 June 2020

Create HTML page & display message using JavaScript Function



<!DOCTYPE html>
<html>
    <head>
        <script>
            function f1(txt){
           document.write(`Hello ! ${txt} Pankaj`);
            }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
            <input type="button" value="In Morning" onclick="f1('Good Morning')" >
            <input type="button" value="In Afternoon" onclick="f1('Good Afternoon')" >
            <input type="button" value="In Evening" onclick="f1('Good Evening')" >
        </form>

    </body>
</html>

Posted By: pankaj_bhakre

No comments:

Post a Comment