What is the JavaScript code snippet to update the content of the timestamp element when the user clicks on it?
(a) timestamp.onLoad = function() { this.innerHTML = new Date().toString(); }
(b) timestamp.onclick = function() { this.innerHTML = new Date().toString(); }
(c) timestamp.onload = function() { this.innerHTML = new Date().toString(); }
(d) timestamp.onclick = function() { innerHTML = new Date().toString(); }
The question was posed to me in final exam.
Question is from JavaScript in Web Browsers in division Server-Side and Client-Side Scripting of JavaScript