Showing posts with label Create Button at Run time on button click by Java Script. Show all posts
Showing posts with label Create Button at Run time on button click by Java Script. Show all posts

Sunday, 13 December 2015

Create Button at Run time on button click by Java Script

Create Button at Run time on button click by Java Script

Source Code :-

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>
<body>
    <p> Click the button to make a BUTTON element with text.</p>
    <button onclick="myFunction()">
        Try it</button>
    <script type="text/javascript">
        function myFunction() {
            var btn = document.createElement("BUTTON");
            var btn1 = document.createTextNode("CLICK Here");
            btn.appendChild(btn1);
            document.body.appendChild(btn);
        }
    </script>
</body>
</html>

OutPut :-















Factorial of a Number

Recently Viewed