O Level Exam : Practical Question
📝 HTML
🎨 CSS
⚡ Java Script
<!doctype html> <html> <head> <script> function change_pic() { document.getElementById("pic").src="b.jpg"; } </script> </head> <body> <img id="pic" src="a.png" width="300px"/> <br/> <input type="button" value="Change Image" onclick="change_pic()"/> </body> </html>
▶ Run Code
🖥 Output: