by innerHTML they mean use javascript to target an element in the page. your javascript can exist in the head. the code can get a little messy if you are writing it from scratch to support all browsers, but you could use a js library like
JQuery and do it like this.
HTML Code:
<html>
<head>
<script type="text/javascript" src="jquery.js" ></script>
<script type="text/javascript" src="myscript.js" ></script>
</head>
<body>
<p>My Web Page</p>
<div id="print_div"></div>
</body>
</html>
myscript.js
HTML Code:
$(document).ready(function() {
$('#print_div').html('<a href="javascript:window.print()">Print this page</a>');
});
If JS is not supported, nothing will be injected in print_div.
**edited**