...

View Full Version : put the cursor on form_box1



joonstar
04-12-2005, 08:33 AM
<form action="action.php">

<input name="form_box1"
value=""
type="text"
size="15">

<input type="submit" value="Submit">

</form>

I have the above code.

when I open the file by browser,
I like to make the cursor on the input box named "form_box1"

How can I do it?

_Aerospace_Eng_
04-12-2005, 08:44 AM
try this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body onload="document.form1.form_box1.focus()">
<form name="form1" action="action.php">

<input name="form_box1"
value=""
type="text"
size="15">

<input type="submit" value="Submit">

</form>
</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum