The first step in this process is to create a custom button for Leads. To do this get into your org "Setup," select "Customize" under the "App Setup" listing then "Leads" and finally "Buttons and Links." On the resulting page you will find a listing of your standard Lead buttons and any overrides for them in addition to a section listing custom buttons and links. Scroll down to the "Custom Buttons and Links" section and click the "New" button.
I put some good comments in the code so you can understand exactly what each line is attempting to do. The one portion of the code I would like to highlight is the line that declares the "url" variable and the line that reads "parent.location.href = url."
I've seen some examples out there where the developer will indicate that the line for refreshing the page is "window.location.reload();" instead of what I coded. The reason I did not use the reload method is because this will not work in Firefox.
After you have pasted the code from above into your org you should click the "Save" button. An alert message will pop up reading "The new custom button will not be displayed to users until you add it to the search layout." Simply click the "OK" button in the alert.
You will then be sent to the detail page for the button that was just created. Navigate to the "Search Layouts" admin page for your Lead object within "Setup." There you will click the "Edit" link located to the left-hand side of the row reading "Leads List View" as the "Layout Name." Under the "Custom Buttons" section of the resulting page simply move the button you created into the "Selected Buttons" option and click the "Save" button.
To test the functionality you can navigate to the Leads tab and select any list view. Once on the view you will see the new button. Select some leads using the checkboxes to the left-hand side of the record list and click the custom button.
I understand that this type of functionality is not needed within any orgs due to the fact that there is a standard "Change Status" button on Lead list views that allows you to do the same thing. However, the code and steps will allow you to literally copy & paste the logic into your org so you can see how to apply it to other, more practical, business needs.