Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>Waktu Solat</title>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
- </head>
- <body>
- <div id="waktu_solat"></div>
- <script>
- $(document).ready(function(){
- var waktu = ["Subuh", "Syuruk", "Zohor", "Asar", "Maghrib", "Isyak"];
- $.getJSON("https://mpt.i906.my/mpt.json?code=mlk-0&filter=1", function(data){
- for(var i = 0; i < data.response.times.length; i++){
- var d = new Date(data.response.times[i] * 1000);
- var jam = d.getHours();
- var minit = d.getMinutes();
- $("#waktu_solat").append(waktu[i] + " " + jam + ":" + minit + "<br>");
- }
- });
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement