cse110-fa22-group29/source/assets/scripts/ReviewPage.js

14 lines
367 B
JavaScript
Raw Normal View History

2022-11-12 18:10:07 +00:00
// Run the init() function when the page has loaded
window.addEventListener('DOMContentLoaded', init);
function init() {
let result = sessionStorage.getItem('currReview')
let main = document.querySelector('main');
main.innerHTML = result
2022-11-12 18:33:30 +00:00
let p = document.createElement('p')
p.innerHTML = JSON.parse(result)['comments']
main.append(p)
2022-11-12 18:10:07 +00:00
}