Question 6(d) 2021 · May-June · Paper 11 · 2 marks
Reveal official mark-scheme answer
Official answer for Question 6
Part (d)
Question 1
mark for each pair of correct answers (shaded):
Question 2
Show text version of question
Question 6
Part (d)
Question 6
A web page includes HTML, JavaScript and PHP code.
01 <html> 02 <body> 03 04 <p> 05 <?PHP 06 $message = "Enter the current time" 07 echo $message 08 ?> 09 </p>
Question 10
11 24 hour clock hour<input id = "Time" value = ""> 12 <button onclick = "timeOfDay()">Enter</button>
Question 13
14 <script> 15 function timeOfDay() { 16 var hour, greeting; 17 hour = document.getElementById("Time").value; 18 if (hour < 18) { 19 greeting = "Good day"; 20 } else { 21 greeting = "Good evening"; 22 } 23 alert(greeting); 24 } 25 </script>
Question 26
27 </body> 28 </html>
Part (d)
Tick (3) one box in each row to indicate whether each of the following statements is true or
false.
Statement True False
The program contains client-side and server-side code
The PHP code in the program will run on the client-side
Line 19 of the code outputs the message "Good day"
Line 18 of the code contains a conditional statement
Why this question appears here
71% assigned-topic match · Hardware › Logic gates and logic circuits
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9608_s21_qp_11.pdf
