Add an onclick event handler that calls the content()
function to the button element in the main
section.
<button type="button" onclick="content()">View new page content</button>
This is what I did but it does not run. Am I doing something wrong?