hi all,
i had a login page. so whenever i come to login page i am moving to the username text box and selecting that and typing username. so how can i directly type username wat i mean is immediately after coming to login page the cursor should be in the username text box.please help me.
Thank u..!

<body onload='document.getElementById("username").focus();'>

This will pass the focus to the textbox with id "username" after the document is loaded.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.