title: how to call webservice using Ajax with jquery?
body: <p>I'm using the following code to call the webservice by using jQuery ajax. But It doesn't work? The webservice return the value in JSON format. How can I access the webservice through this code?</p>
  
  <pre><code>&lt;html&gt;
      &lt;script type="text/javascript" src="js/jquery-1.7.2.min.js"&gt;&lt;/script&gt;
      &lt;script&gt;
      $(document).ready(function () {
          $('input[id^="button"]').click(function () {
              alert('You have clicked ' + $(this).val());
              $.ajax({
                  type: 'Get',
                  url: 'http://localhost:56789/xxx/Handler.ashx?key=yyy ',
                  success: function (data) {
                      alert(data);
                  }
              });
  
          })
      })
      &lt;/script&gt;
  
       &lt;body&gt;
          &lt;div id="Sample_Div"&gt;
              &lt;input type="button" id="button1" value="button1" /&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>