Copy field to another field with button

I want to copy field to another field with button in form.
can you give me any example please. Thanks

Create a button type ajax in its script
{your_field} = {other_field};

yes this is working but i want to make button near the field.

I think you can create a javascript event onclick for yor field FORM SETTING → JAVASCRIPT
and then the script:

document.F1.your_field.value = document.F1.ther_field.value;

i did create a field type html image.
But if i want to create an event. Select the field to create an event not shows my html image type.