There is a javascript-based interface - so I need not to support work without javascript.
I have an
Something
e
Neither. If your link doesn't go anywhere, don't use an <a> element. Use a <span> or something else appropriate and add CSS to style it as you wish.
Both are poor choices. Presentation shouldn't mix with content. That means no javascript: URIs, and definitely no onclick attributes.
The way to do it:
<a id="myLink">Something</a>
<script>
function myFunction(...) { ... }
document.getElementById('myLink').addEventListener('click', myFunction, false);
</script>