javascript using this with onclick code example
Example: button functions html
<script>
function myFunction() {
alert("ALERT");
}
</script>
<button onclick="myFunction">Click</button>
<script>
function myFunction() {
alert("ALERT");
}
</script>
<button onclick="myFunction">Click</button>