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>

Variable , Assign multiple variable in python with short program

  See video -  Go to video Code : # variable x = 7 y = 5 z = 9 print ( x + y + z ) #assign multiple variable x , y , z = "hello...