In order to call javascript inside tag , u can use this approach :
<a onclick="jsfunction()" href="#">
Or
<a onclick="jsfunction()" href="https://stackoverflow.com/questions/36150848/javascript:void(0);">
2
solved Link to a file and javascript simultaneously