onload moving cursor (focus) on first field of form

  • Follow


Hi!

	As mentioned in title. How to do it?

Thanks
Zvonko
0
Reply Zvonko 8/26/2005 9:25:11 AM

The easier version...

<body onload="document.forms[0].elements[0].focus();">

Or the better version...

<script language="javascript" type="text/javascript">
function loadFocus() {
	document.forms[0].elements[0].focus();
}
window.onload = loadFocus;
</script>

Both will give the focus to the first field in the first form.

Binny V A
http://binnyva.blogspot.com

0
Reply binnyva 8/26/2005 11:40:56 AM


1 Replies
458 Views

(page loaded in 0.054 seconds)

Similiar Articles:













7/24/2012 5:11:19 AM


Reply: