Improved version (previous version still acceptable):
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Untitled</title>
<script type="text/javascript">
"use strict";
function sb()
{
var TB = document.getElementById('myDiv');
if (!TB) {
throw new Error("The element with the ID 'myDiv' does not exist.");
}
TB.innerHTML = "This is something placed into the div tag";
}//end of function
</script>
</head>
<body>
<button onclick="sb()">Show text</button>
<div id="myDiv"></div>
</body>
</html>
I decided not to add the inline js (but made 'onclick' lower-case); I received an error from HTML-Kit saying that it does not exist (non-syntax error).