Page 1 of 1

QUESTION 2 Figure 3 shows an HTML markup for a Checking Student Status Form in which the user can enter credit hours for

Posted: Fri Jul 08, 2022 6:17 am
by answerhappygod
Question 2 Figure 3 Shows An Html Markup For A Checking Student Status Form In Which The User Can Enter Credit Hours For 1
Question 2 Figure 3 Shows An Html Markup For A Checking Student Status Form In Which The User Can Enter Credit Hours For 1 (129.37 KiB) Viewed 33 times
QUESTION 2 Figure 3 shows an HTML markup for a Checking Student Status Form in which the user can enter credit hours for the current semester and a message will be displayed indicating whether the status is Full-time or Part-time. <div id="chckStatus"> </div> <h1>Checking Student Status</h1> <form id="formChkStatus"> <label for="crHrs">Enter your credit hours: </label> <input type="text" id="crHrs" /> <div id="feedback"></div> <input type="submit" value="Check" /> </form> Figure 3 a) Create a JavaScript function called checkCreditHours () that will display a message whether the student is full-time or part-time. If the value received less than 8 and greater than 24, display "Please enter a valid credit hour" at <div> with id="feedback". If the value less and equal to 12, pass the message "Status: Part time student." or else "Status: Full time student." . Use the following declaration: var elForm = document.getElementById("formChkStatus"); var elMsg = document.getElementById("feedback"); var elCrHrs = document.getElementById("crHrs"); (5 marks) b) Write an event listener that will trigger function checkCreditHours when button submit is clicked.