Untitled
unknown
plain_text
2 years ago
1.5 kB
6
Indexable
<!DOCTYPE html>
<html>
<head>
<title>Back-End Promoter</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
$(document).ready(function() {
$.ajax({
url: "backend.php",
type: "GET",
dataType: "json",
success: function(data) {
// Process the data received from the server
// and dynamically generate content on the webpage
for (var i = 0; i < data.length; i++) {
var item = data[i];
var content = "<div class='promoter-item'>" +
"<h3>" + item.title + "</h3>" +
"<p>" + item.description + "</p>" +
"</div>";
$("#promoter-container").append(content);
}
},
error: function() {
// Handle error if the server request fails
$("#promoter-container").html("Failed to load promoter content.");
}
});
});
</script>
<style>
.promoter-item {
margin-bottom: 20px;
}
.promoter-item h3 {
color: #333;
}
.promoter-item p {
color: #666;
}
</style>
</head>
<body>
<div id="promoter-container"></div>
</body>
</html>
Editor is loading...