JavaScript onClick Function #Part 8
The onclick event executes a certain functionality when a button is clicked. onclick event generally occurs when the user clicks on an element.
JavaScript Code
<script>
function myFunction()
{
alert("Code Pocket");
}
</script>
<button onClick="myFunction()" style="background-color:green; color: black" >submit</button>
Try it Yourself...
what you think about this article ??