A lot of the time I see people calling javascript functions using colon (:).
Like onclick=\"javascript:functionname();\"
The same function works wit
javascript: prefix is extremely important when you put code to anchor href attribute:
Anchor
Whereas in inline event attributes (like onclick, onsubmit, onmouseover, etc.) javascript: prefix is not important.
However, you should note that both approaches given here are not good to implement and you should use alternative ways (e.g as @Paul S. stated in the comments)