skip to Main Content

Html – How to modify the event object before the DOM event callback function is executed

<body> <button onclick="myFunction()">CLICK</button> <script> function myFunction(event) { // do something based on the value of the event's property } </script> </body> <body> <button id="myButton">CLICK</button> <script> var button = document.getElementById("myButton"); button.addEventListener("click", myFunction); function myFunction(event) { // do something based on the…

VIEW QUESTION

Html – Please tell me why this occurs. When I am adding border to div tag, it adds extra lines to it. How to solve this problem?

HTML markup: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="container"> <p> Lorem ipsum, dolor sit amet consectetur adipisicing elit. Ad maxime accusantium neque id omnis, deleniti nisi, vitae eius…

VIEW QUESTION
Back To Top
Search