`; header.appendChild(title); header.appendChild(minButton); input.appendChild(header); form.style = `padding: 25px;`; typeL.innerHTML = "I'm enquiring as a: *"; typeL.style = `font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', 'sans-serif';`; typeS.id = 'type'; typeS.style = `width: 100%; padding: 12px 20px; margin: 8px 0; display: inline-block; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box;`; fnameL.innerHTML = "First name: *"; fnameL.style = `font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', 'sans-serif';`; fnameI.id = 'fname'; fnameI.style = `width: 100%; padding: 12px 20px; margin: 8px 0; display: inline-block; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box;`; fnameI.placeholder = 'Your first name..'; fnameI.required = true; // Add the required attribute lnameL.innerHTML = "Last name: *"; lnameL.style = `font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', 'sans-serif';`; lnameI.id = 'lname'; lnameI.style = `width: 100%; padding: 12px 20px; margin: 8px 0; display: inline-block; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box;`; lnameI.placeholder = 'Your last name..'; lnameI.required = true; // Add the required attribute contactIdL.innerHTML = "Student/工作人员 number: *"; contactIdL.style = `font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', 'sans-serif';`; contactIdI.id = 'contactId'; contactIdI.style = `width: 100%; padding: 12px 20px; margin: 8px 0; display: inline-block; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box;`; contactIdI.placeholder = 'Number..'; contactIdI.required = true; // Add the required attribute emailL.innerHTML = "Email: *"; emailL.style = `font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', 'sans-serif';`; emailI.id = 'email'; emailI.style = `width: 100%; padding: 12px 20px; margin: 8px 0; display: inline-block; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box;`; emailI.placeholder = 'Email..'; emailI.type = 'email'; // Set input type to 'email' for email validation emailI.required = true; // Add the required attribute collegeL.innerHTML = "My RMIT College is: *"; collegeL.style = `font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', 'sans-serif';`; collegeS.id = 'college'; collegeS.style = `width: 100%; padding: 12px 20px; margin: 8px 0; display: inline-block; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box;`; option1.value = ''; option1.innerText = '--Choose--'; option1.disabled = true; option1.selected = true; option2.value = 'RMIT Student'; option2.innerText = 'RMIT Student'; option3.value = 'RMIT在线'; option3.innerText = 'RMIT在线'; option4.value = 'RMIT 工作人员'; option4.innerText = 'RMIT 工作人员'; option5.value = 'RMIT 校友'; option5.innerText = 'RMIT 校友'; option6.value = 'Visitor'; option6.innerText = 'Visitor'; optionCollege1.value = ''; optionCollege1.innerText = '--Choose--'; optionCollege1.disabled = true; optionCollege1.selected = true; optionCollege2.value = 'Business and Law'; optionCollege2.innerText = 'Business and Law'; optionCollege3.value = 'Design and Social Context'; optionCollege3.innerText = 'Design and Social Context'; optionCollege4.value = 'STEM College'; optionCollege4.innerText = 'STEM College'; optionCollege5.value = 'VE'; optionCollege5.innerText = 'VE'; optionCollege6.value = "I'm not from RMIT"; optionCollege6.innerText = "I'm not from RMIT"; optionCollege7.value = 'Other'; optionCollege7.innerText = 'Other'; submit.style = `width: 100%; background-color: ${hexColor}; color: white; padding: 14px 0px; margin: 10px 0 0 0; border: none; border-radius: 4px; cursor: pointer;`; submit.innerText = 'Submit'; submit.onclick = function () { // Check if the form is valid before toggling the messenger if (validateForm()) { toggleMessenger(); } }; typeS.appendChild(option1); typeS.appendChild(option2); typeS.appendChild(option3); typeS.appendChild(option4); typeS.appendChild(option5); typeS.appendChild(option6); collegeS.appendChild(optionCollege1); collegeS.appendChild(optionCollege2); collegeS.appendChild(optionCollege3); collegeS.appendChild(optionCollege4); collegeS.appendChild(optionCollege5); collegeS.appendChild(optionCollege6); collegeS.appendChild(optionCollege7); form.appendChild(typeL); form.appendChild(typeS); form.appendChild(fnameL); form.appendChild(fnameI); form.appendChild(lnameL); form.appendChild(lnameI); form.appendChild(contactIdL); form.appendChild(contactIdI); form.appendChild(emailL); form.appendChild(emailI); form.appendChild(collegeL); form.appendChild(collegeS); form.appendChild(submit); input.appendChild(form); // Function to display error message below the form field function displayErrorMessage(element, message) { const errorDiv = document.createElement('div'); errorDiv.className = 'error-message'; errorDiv.style.color = 'red'; errorDiv.textContent = message; element.parentNode.insertBefore(errorDiv, element.nextSibling); } // Function to clear error messages function clearErrorMessages() { const errorMessages = document.querySelectorAll('.error-message'); errorMessages.forEach((errorMessage) => errorMessage.remove()); } // Function to validate the form function validateForm() { let isValid = true; // Reset previous error messages document.querySelectorAll('.error-message').forEach((el) => el.remove()); if (typeS.value === "") { isValid = false; displayErrorMessage(typeS, 'Please choose an option.'); } if (collegeS.value === "") { isValid = false; displayErrorMessage(collegeS, 'Please choose an option.'); } // Validate first name if (fnameI.value.trim() === '') { isValid = false; displayErrorMessage(fnameI, 'Please enter your first name.'); } // Validate last name if (lnameI.value.trim() === '') { isValid = false; displayErrorMessage(lnameI, 'Please enter your last name.'); } // Validate student/staff number if (contactIdI.value.trim() === '') { isValid = false; displayErrorMessage(contactIdI, 'Please enter your student/staff number.'); } // Validate email if (emailI.value.trim() === '' || !isValidEmail(emailI.value)) { isValid = false; displayErrorMessage(emailI, 'Please enter a valid email address.'); } return isValid; } // Function to validate email address using a regular expression function isValidEmail(email) { const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; return emailRegex.test(email); } document.body.appendChild(input); // Listen to screen sizing for mobile & dynamic pc function sizeChanged() { if (window.innerWidth < 600 && screenSize !== 'mobile') { screenSize = 'mobile'; let input = document.getElementById('input'); input.style.width = '100%'; input.style.height = '100%'; input.style.bottom = 0; input.style.right = 0; } if (window.innerWidth > 600 && screenSize !== 'pc') { screenSize = 'pc'; let input = document.getElementById('input'); input.style.width = '408px'; input.style.height = '648px'; input.style.bottom = '30px'; input.style.right = '30px'; } } let screenSize = ''; window.addEventListener('resize', sizeChanged); sizeChanged();
原住民旗
托雷斯海峡旗

国家确认

墨尔本皇家理工大学感谢东部库林民族的Woi wurrung和Boon wurrung语言群体的人民,正规cq9正规电子-apple app store排行榜-为狂热体育电子游戏而生的排行榜在他们的未被割让的土地上开展大学的业务. 皇家墨尔本理工大学尊敬地感谢他们的祖先和长辈,过去的和现在的. 皇家墨尔本理工大学还向正规cq9正规电子-apple app store排行榜-为狂热体育电子游戏而生的排行榜开展业务的澳大利亚土地和水域的传统保管人及其祖先表示感谢——Mark Cleaver的艺术品“Luwaytini”, Palawa.