calling a form's local method from html field's html

Can I call a method something like the following:

<a href="javascript:forms.test1.testMethod()">test</a>

Thanks

Sorry! this works for me already.