isclicked in javascript code example
Example 1: how to check if the button is clicked or not in javascript
if(document.getElementbyId("id do item").clicked == true){
window.alert("ok")
}
Example 2: javascript click event
<button onclick="myFunction()">Click me</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Hello World";
}
</script>