Lightning Components: What is the easiest way to have an onclick event on a HTML-tag?
Inline Javascript is not supported due to security threat and you can simply use onclick event and always follow the Unobtrusive principles.You can look at document here which mentions to avoid inline script
Try below code
<div style="border: green solid 3px;" onclick="{!c.logData}">
<br/>
<br/>
<br/>
</div>
The controller code
({
logData : function( cmp, evt, h ){
console.log(123);
}
})