Here is the demo of the code. You can select and see the query string in your address bar with the value of the period button.
Type
Male
Female
Back to
Period button onClick event tutorial