I don\'t know if this is allowed or even possible. Is it possible to create a div element with an onclick event so that if anywhere in the div\'s area is clicked, the event
The onclick property will not take a string when assigned. Instead, it takes a function reference (in this case, printWorking).
The onclick attribute can be a string when assigned in HTML, e.g. , but this is generally not recommended.