faqts : Computers : Programming : Languages : JavaScript : Forms : TextAreas/TextFields

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

84 of 107 people (79%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

How would you set the focus to a textarea in a form when the page loads (ie: google.com)?

Jun 12th, 2000 12:25
Brian Williams,


I got to looking agian and figured this one out.
<head>
<script language="Javascript">
function begin()
  {
  document.form_name.field.focus();
  }
</script>
</head>
<body onLoad="begin()">