Friday, January 17, 2020


<html>

<body>
<p id = "GFG_UP" style =

"font-size: 16px; font-weight: bold;">    

        </p>

 <button onclick = "gfg_Run()">

            Click here

        </button>

       

        <p id = "GFG_DOWN" style =

            "color:green; font-size: 20px; font-weight: bold;">

        </p>

       

   
<center><script>

var el_up = document.getElementById("GFG_UP");

            var el_down = document.getElementById("GFG_DOWN");

            var str = "Click on button to change the background color";

       

            el_up.innerHTML = str;

       

            function changeColor(color) {

 document.body.style.background = color;

            }

           

            function gfg_Run() {

                changeColor('yellow');

                el_down.innerHTML = "NEW MAXWELL CENTER";

            }        




    var welcome;

    var date = new Date();

    var hour = date.getHours();

    var minute = date.getMinutes();

    var second = date.getSeconds();

    if (minute < 10) {

        minute = "0" + minute;

    }

    if (second < 10) {

        second = "0" + second;

    }

    if (hour < 12) {

        welcome = "Good morning !";

    }

    else if (hour < 17) {

        welcome = "Good afternoon !";

    }

    else {

        welcome = "Good evening !";

    }

    document.write("<h2>" + "<font color='red'>" + welcome + "</font>" +
 "<br>"  + "RAHUL KUMAR");

    document.write("<br>" + hour + ":" + minute + ":" + second);


</script>
</center>
</body>

</html>



No comments:

Post a Comment

PERIPHERAL DEVICED IN MLTIMEDIA

PERIPHERAL DEVICED IN MLTIMEDIA A  peripheral  is a “device that is used to put information into or get information out of the co...