This is an extremely simple question but possibly so simple I cannot find the answer online. I am first assuming that this is correct
<html>
<head>
<script language="javascript" type="text/javascript">
function sayit(){
alert('hello');
}
</script>
</head>
<body>
<button onclick="sayit()">Say it</button>
</body>
</html>
This code should work shouldn't it?