Q:

RadioGroup. Switch

I Have
<html>
<head>
  <meta charset="utf-8">
  <title></title>
</head>
<body>
  <div id="menu">
    <input type="radio" name="RadioGroup" id="RadioGroup_0" value="0">Item 1</label>
  <br>
    <input type="radio" name="RadioGroup" id="RadioGroup_1" value="1">Item 2</label>
  </div>

  <script src="js/options.js"></script>
</body>
</html>

I want make switch
 var elements = document.getElementsByName('RadioGroup');
  switch (elements.value) {
    case 0:
      alert("0");
      break;
    case 1: 
      alert("1");
  }

But, not work.

A:

Here I've added a button to check your switch.
HTML
<div id="menu">
            <input type="radio" class="RadioGroup" name="RadioGroup" id="RadioGroup_0" value="0">Item 1</label>
            <br>

            <input type="radio"  class="RadioGroup" name="RadioGroup" id="RadioGroup_1" value="1">Item 2</label>
                <button>check</button>
</div>

JS
$('button').click(function(event){
var value=$("#menu>input:radio[name='RadioGroup']:checked").val();
switch (value) {
    case '0':
        alert("0");
        break;
    case '1': 
        alert("1");
}

The value you were trying in switch was a character. I just included that in '' in your cases. Important note: requires jQuery 
Demo JSFIDDLE

