How to value get value from API using jquery

             In this Articles can works with get value from API and use in JQuery Ajax. Already Seen How to get Data from Database To Web API. Now In this section will Display The Records from API.

Code


<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>test</title>
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>

    <script type="text/javascript">
        $(function () {
            $.getJSON('http://localhost:50879/api/name/getname', function (data) {
                console.log(data);
                alert(data);
            })
        });
            </script>
                </head>
                <body>
                    <div></div>
                </body>
                </html>

Comments

Popular posts from this blog

Display Canvasjs Line Chart using Data from Database

Insecure cookie setting: missing Secure flag

Tips for Protecting Your Email Privacy