How do you set focus to a hyperlink when web page opens??
:confused:
Printable View
How do you set focus to a hyperlink when web page opens??
:confused:
mate, i dont think it is possible but if it is then cool :cool:
i think thats impossible, you have to click on a hyperlink you cannot focus like you can on a text box. as below
document.LoginForm.Username.focus();
sorry about that mate,
if you hear differently then respect to who ever figures it out.
umm.... of course it's possible... same way you would do it to any other element:
Code:<HTML>
<HEAD>
<SCRIPT language=javascript>
function window_onload()
{
MyLink.focus();
}
</SCRIPT>
</HEAD>
<BODY onload="window_onload()">
<A name=MyLink id=MyLink HREF="Home.htm">Click Here</A>
</BODY>
</HTML>