Showing posts with label bom model. Show all posts
Showing posts with label bom model. Show all posts

Friday, September 6, 2024

Browser Object Model in javascript

Timing code-

<input type="button" value="Click" onclick="setTimeout(hello, 5000)">

<script>
    function hello(){

       // alert("yes you can go anywhere!!");

       window.location='https://www.google.com/';
    }
</script>    



 Confirm popup code-


<input type="button" value="Click to Know" onclick="hello()">
<p id="show"></p>


<script>
    function hello(){

        var result;
            if(confirm("Yes tell me what you want to do?"))
                {
                        result = "You press OK!!!";
                }
            else{
                        result = "You press Cancel!!!!!!!!";

                }

    document.getElementById("show").innerHTML=result;

}

</script>

Start your smart training now!

  Call us on - +91-7080234447 or Visit - https://www.websitedevelopmentservices.in/training