• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

  • 0
Sign in to follow this  

placing the cursor in the 'search box'

Question

Adam1V    90

I have created a local web page (intranet) which has a simple google search in the top left corner.

When the page loads, the blinking cursor is not in the search box i creatd.

I was just wondering how easy this is?

Adam

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
GatorV    1

add a Javascript function on to the page something like:

window.onload = function() {
	  document.getElementById( "your_input_box" ).focus();
};

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.