1var targetDiv = document.getElementById('content');
2 var htmlContent = '';
3
4 function populateData(event){
5 switch(event.target.value){
6 case 'A':{
7 htmlContent = 'Content for A';
8 break;
9 }
10 case 'B':{
11 htmlContent = "content for B";
12break;
13 }
14 }
15 targetDiv.innerHTML = htmlContent;
16 }