<!-- Replace alert('hi'); with your own JavaScript. -->
<a href="javascript:alert('hi');void 0;">Hello</a>
<!-- For code that is likely to throw errors, wrap the body of the bookmarklet in a try/catch block: -->
<a href="javascript:try{doSomething()}catch(e){};void 0;">What could go wrogn?</a>