Is there a way to write following code inline like so?

```
<a href="#" onClick="function(){
    //do something;
    return false;
};return false;"></a>

```

Instead of doing this:

```
 <a href="#" onClick="doSomething(); return false;"></a>

 function doSomething(){
    //do something;
 }

```