javascript to change value on screen with radio button

Solutions on MaxInterview for javascript to change value on screen with radio button by the best coders in the world

showing results for - "javascript to change value on screen with radio button"
Noah
21 Jan 2016
1$(document).ready(function(){
2    $('input[name=content_type]').on('change', function(){
3    var n = $(this).val();
4    switch(n)
5    {
6            case '1':
7                  $('#show').html("1st radio button");
8                  break;
9            case '2':
10                  $('#show').html("2nd radio button");
11                  break;
12            case '3':
13                  $('#show').html("3rd radio button");
14                  break;
15        }
16    });
17});
18