<html>
<script type="text/javascript">
function autofocus() {
document.getElementById('inputfield').focus();
}
window.onload = autofocus;
</script>
<body>
<p>This page has a auto focused input field.</p>
<input type="text" id="inputfield" />
</body>
</html>