php-test / hi.html
Dooratre's picture
Upload 3 files
8e19dd8 verified
raw
history blame contribute delete
561 Bytes
<!DOCTYPE html>
<html>
<head>
<title>User JSON Display</title>
<script>
// Fetch the user.json file
fetch('user.json')
.then(response => response.json())
.then(data => {
// Display the JSON data
document.getElementById('user-data').textContent = JSON.stringify(data, null, 2);
})
.catch(error => {
console.error('Error:', error);
});
</script>
</head>
<body>
<pre id="user-data"></pre>
</body>
</html>