i have a login page which contains a text box for a username

i want whenever i get to this page the Cursor is in the Text Box Waiting for my entry
i know its so simple but im new to JS

Recommended Answers

All 2 Replies

try

<script language="javascript" type="text/javascript">
function foc(){
document.getElementById('textfieldid').focus();
}
</script>
<body onload="foc();">

THanks A Million

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.