javascript:func()
is using the javascript protocol so that it could be used in an anchors href
attribute. However, don't do this see Why is it bad practice to use links with the javascript: “protocol”? for more information.
Event handlers are preferable to trigger events instead of attributes.