Question 10(a) 2025 · October-November · Paper 32 · 0 marks
Reveal official mark-scheme answer
Official answer for Question 10
Part (a)
Question 4
- Onclick() captures the mouse click
- (when user) clicks on the text1 (in line 5)
- Passes control to script line 7 / function in line 8
- id parameter is passed to function
- id.innerHTML changes text in HTML <h2> (in line 9)
- New text appears on web page.
Show text version of question
Question 10
Part (a)
Question 10
JavaScript code can be executed when an HTML event happens in a web browser. An example of
an HTML event is when a user clicks a mouse button.
Part (a)
Describe how the JavaScript in this HTML code changes the display of text on the web page
when a mouse button is clicked.
The line numbers are included for reference only.
1 <html> 2 <body>
Question 3
4 <h2>Cambridge International JS Code: HTML Event</h2> 5 <h2 onclick="changeText(this)">Click on this line to see the name of this 9626 QP</h2>
Question 6
7 <script> 8 function changeText(id) { 9 id.innerHTML = "A Level IT Paper 3"; 10 }
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_w25_qp_32.pdf
