Currently I am working on the project where i have to fetch information from web API into web application using JQuery.
<script src="jquery-1.11.2.js"></script>
<script src="jquery-1.11.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
jQuery.support.cors = true;
$("#btn").click(function () {
$.ajax({
url: "http://localhost:52227/api/Values",
type: "GET",
dataType: "json",
success: function (data) {
alert("hello");
}
});
});
});
</script>
<body>
<form id="form1" runat="server">
<div>
<input type="button" id="btn" value="submit" />
</div>
</form>
When I run this application it is not showing me any output.