After a while I could not find a proper answer to this question: Is there any difference in using html events over javascript ones?
What I mean is, would it not be easier to maintain/change the code of a page with having all the javascript separately without using the html event attributes? Or is there any other possible reason for their usage?
Just a small snippet of what I mean (using the html event attribute)
function addValue() {
$("#clickButton").text(parseInt($("#clickButton").text())+1);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!DOCTYPE html>
<html>
<body>
<button id = "clickButton" onclick = "addValue()">0</button>
</body>
</html>