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?
<html>
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script>
$(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);
}
});
})
})
</script>
<body>
<div id="Sample_Div">
<input type="button" id="button1" value="button1" />
</div>
</body>
</html>