> Radio button validation using javascipt..?

Radio button validation using javascipt..?

Posted at: 2014-12-18 
Local

Foreign

$("#local").on({

click: function() {

//show input box for id

}

});

$("#foreign").on({

click: function() {

//show input box for passport

}

});

I want to design 2 steps fields in my form.

There are 2 radio buttons as local and foreign. once the user chooses local, he will admit his nic number and when choose foreign button he will admit his passport number. Can someone explain what are the html codes and javascript codes i must use?