Taraf Perkahwinan Web API sample

Contoh data di ambil dari
Sistem Data Dictionary Sektor Awam(SDDSA)

Kod Taraf Perkahwinan


    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css" rel="stylesheet" />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
    <script>
    $(document).ready(function () {
        $.ajax({
            type: "get",
            url: "https://www.azali.net/API/TarafPerkahwinan",
            contentType: "application/json;charset=utf-8",
            dataType: "json",
            data: {},
            success: function (result) {
                    $.each(result, function (i) {
                        $('#tblTarafPerkahwinan').append('<tr><td>' + result[i].KodTarafPerkahwinan + '</td><td>' + result[i].NamaTarafPerkahwinan + '</td></tr>');
                    });
            },
            failure: function () {
                alert("Error");
            }
        });
    });
    </script>
    <h2>Taraf Perkahwinan</h2>
    <div class="container">
        <div class="row">
            <div class="col-xs-10 col-sm-8 col-md-6 col-lg-4">
                <table class="table table-hover well">
                <thead>
                    <tr>
                        <th>Kod</th>
                        <th>Taraf Perkahwinan</th>
                    </tr>
                </thead>
                <tbody id="tblTarafPerkahwinan">
                </tbody>
                </table>
            </div>
        </div>
    </div>

Back to Demo