This the working script.
$.getJSON('http://time.jsontest.com', function(data) {
var text = `Date: ${data.date}<br>
Time: ${data.time}<br>
Unix time: ${data.milliseconds_since_epoch}`
$(".mypanel").html(text);
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="mypanel"></div>
In the above script I replaced the URL as http://abacusshopee.biz/COMPUTERS/test.json
then the Code is not working.
The contents of the JSON file as follows.
{
"date": "09-02-2020",
"milliseconds_since_epoch": 1599029414853,
"time": "06:50:14 AM"
}
I used same json files for fetching data. Both the files contains. same data.
My problem is that when test with the first script, it is working. But when try with the second one (using 'http://abacusshopee.biz/COMPUTERS/test.json') the script not working.