Getting leadId in custom function on button click

Getting leadId in custom function on button click

Hi All,

I have created a custom button on lead and attached custom function to it. I added a string as an argument to that function. Now I want whenever someone click on button from view page of lead, it should send the leadId to that function.

Or is there any way I can get current lead on my function.

Thanks