reference
This commit is contained in:
908 files changed
+93185
No files matched your search
@@ -0,0 +1,18 @@
|
||||
function loadCourse() {
|
||||
let url = window.location.href;
|
||||
let id = url.split("/")[url.split("/").length - 1];
|
||||
|
||||
const xhttp = new XMLHttpRequest();
|
||||
xhttp.onload = function() {
|
||||
let course = JSON.parse(this.response);
|
||||
document.getElementById("title").innerHTML = `${course.department} ${course.id}`;
|
||||
document.getElementById("crsID").innerHTML = `${course.department} ${course.id}`;
|
||||
document.getElementById("crsName").innerHTML = course.name;
|
||||
document.getElementById("crsDes").innerHTML = course.description;
|
||||
document.getElementById("crsCredits").innerHTML = course.credits;
|
||||
}
|
||||
xhttp.open("GET", `/api/course/${id}`);
|
||||
xhttp.send();
|
||||
}
|
||||
|
||||
loadCourse();
|
||||
Reference in new issue
Block a user