Question 2 2018 · May-June · Paper 33 · 6 marks
Reveal official mark-scheme answer
Official answer for Question 2
Question 6
Show text version of question
Question 2
The use of JavaScript within the HTML code of a web page allows the page to react to user intervention. The code below contains a function named checkreadpagefunction that will ask the user to confirm that the page has been read.
Complete the JavaScript code by writing extra code that will capture the click event and execute the function.
<html> <body> <p>Click on the button to confirm that you have read this page.</p> <button id="button1">Click here</button> <script>
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
......................................................................................................................................................[6]
function checkreadpagefunction() { alert ("I have read this page."); } </script> </body> </html>
You may use the space below for any rough work.
Question 5
Why this question appears here
98% assigned-topic match · Programming for the web
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 9626_s18_qp_33.pdf
