xxxxxxxxxx
window.onload = function() {
welcomeName();
}
function welcomeName(){
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
let userName = urlParams.get('full_name');
let welcomeBox = document.getElementById('welcome-box');
let welcomeMessage = `
<h2>Welcome to the quiz ${userName}</h2>
`;
welcomeBox.innerHTML = welcomeMessage;
}
xxxxxxxxxx
window.onload = function() {
welcomeName();
}
function welcomeName(){
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
let userName = urlParams.get('full_name');
let welcomeBox = document.getElementById('welcome-box');
let welcomeMessage = `
<h2>Welcome to the quiz ${userName}</h2>
`;
welcomeBox.innerHTML = welcomeMessage;
}