Here I have explained the events of radio button with javascript.
Let me explain the scenarion first,
We are having two radio button say radioobtn1 and radiobtn2. If I click on the button 1 then I need to show one DIVor FORM. same as when I click on radiobtn 2. I have given the code for the above scenarion.

<script>
function show()
{
if(document.getElementById('radiobtn1').checked)
{
document.form1.style.display='block';
document.form2.style.display='none';
}
else
{
document.form1.style.display='none';
document.form2.style.display='block';
}
}
</script>


<input type="radio" checked="checked" onClick="javascript:show()" name="radiobtn1" id="radiobtn1" value="radiobtn1" /> Radiobtn1
<input type="radio" name="radiobtn2" onClick="javascript:show()" id="radiobtn2" value="radiobtn2" /> radiobutton2

<form action='#url' name="form1" METHOD='POST'>
<table>
<tr class="displaynone">
<td>THIS IS FORM1
contents goes here
</td>
</table>
</form>


<form action='#url' class="displaynone" name="form2" METHOD='POST'>
<table>
<tr class="displaynone">
<td>THIS IS FORM2:

contents goes here

</td>
</table>
</form>
 
 
Hope this should help for freshers and even for all.....
 
Happy Coding!!!!!!!!!