<!DOCTYPE html>
<html lang="en">
<head>
<title>John M. Fuller</title>
<script type="type/javascript">
//Javascript goes here
function hello()
{
document.getElementById('line1') .innerHTML="Hello World";
}
</script>
</head>
<body>
<div id="line1">Welcome to CSCI 4</div>
<button type="button" style="height: 26px">Click Me!</button>
<a href='#' onclick="hello()"></a>
</body>
</html>
I am most curious about the last three function lines of code, and specifically about the last two, creating a button that will post a "Hello World" message when clicked, I got a lot of this from an intro to programming (web programming obviously, and the book is O'Reilly's HTML5 Canvas. I have gone over multiple possible solutions, but as much as possible, I need to leave the fix in the last two lines of 'body' code.
Any ideas as to what I'm doing wrong? Or what I have copied or merged incorrectly from w3schools.com?

Help



