title: Get value of radio button with onChange for javascript function
body: <p>I have some radio buttons and I want to get their values with onChange for my function.</p>
  
  <pre><code>&lt;input type="radio" name="rating" value="1" onchange="getRating(???)&gt; 1
  &lt;input type="radio" name="rating" value="2" onchange="getRating(???)&gt; 2
  &lt;input type="radio" name="rating" value="3" onchange="getRating(???)&gt; 3
  </code></pre>
  
  <p>my function:</p>
  
  <pre><code>function getRating(ratingValue) {
       $.ajax({
            url: '/Rating/Create',
            type: "POST",
            data: {rating: ratingValue.value },
       success: function (data) {
            //Successmessage
            console.log(ratingValue);
       },
       error: function (xhr) {
            //Errormessage
      }
  </code></pre>
  
  <p>How can I get the value of the radio button?</p>