Let's say I have the following code:
<script>
function billy() {
alert('muahahahaha!');
}
function suzzy() {
return;
}
</script>
and a button like this (with an undefined onclick handler):
<input type='button' value='click me' onClick='FRANK()' />
When I click the button, the following appears in the developer console:
Function 'FRANK()' is not defined.
How could I store that message in a variable and display it on the page?
document.getElementById('prompt').innerHTML = log;
So it would appear as:
<div id='prompt'>
Function 'FRANK()' has not been defined.
</div>