The basic code is correct, but it has to be connected to the field.
The easiest way would be to use the Calculate event, where you would enter this:
event.value = Math.round((event.value*100)/100) ;
And that should do it. However, be careful that the calculation order is correct if you have several fields using calculations.
Hope this can help.
Max Wyss.