HTML Forms: Flashing Cursor within an HTML Form Input Box on Web Page Load
|
You can set up your HTML web page
forms so that when your web page loads your visitor's cursor will be flashing
within your form.
Place the following code witin your <BODY> tag. This code tells the
browser to place the cursor within the "customer" form in the "email" text
box.
<body
onLoad="focus();customer.email.focus()"> |
The "customer"
text indicated in red, represents the name of your form. The name attribute
should be added to your form like this:
You can change
the name to whatever you'd like. However, make sure you also change it within
your <BODY> tag as well, as they must be the same.
The "email" text indicated in red, represents the name of your form element.
The <input> attribute should be written like this:
<input
type="text" name="email"> |
You can change
the "email" name to whatever you'd like. However, make sure you also change
it within your <BODY> tag as well, as they must be the same.
By displaying a flashing cursor within your HTML web page form, your visitors
attention will instantly be directed to your form.
More Web Design
Tips |