getting value of selected/clicking li element.

getting value of selected/clicking li element.

Hi!.i try to make thing like this: My list is like below:
<
ul id ="cssdropdown">
   < li class ="headlink">
              Search Engines
         < ul >
              < li > Home </ li >
              < li > Downloads </ li >
              < li > Live Search </ li >
         </ ul >
   </ li >
</ ul >
 
what i want is, when i click the <li>(home,downloads..),i will take its value and i write the value instead of "Search engine". How can i make this?
Thanks...