disable save button after clicked

Hi,
I want to use javascript to disable the the save button in the new/edit form after the button is clicked to prevent duplicates from happening. How do I add the onclick event to the save button. I know that this button is created in the QuickForm. Thanks.
I want to use javascript to disable the the save button in the new/edit form after the button is clicked to prevent duplicates from happening. How do I add the onclick event to the save button. I know that this button is created in the QuickForm. Thanks.