且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将光标放在文本框上默认?

更新时间:2023-02-13 14:35:31

请参见此处: 如何在HTML中控制标签顺序 [ ^ ]


Hi,
I have a textbox in my web application and having login page have user id and password. Now i want that if the page loads then cursor should be on userid textbox after entering textbox userid it goes to textbox Password. How to do this? Anyone Know help me.

What I have tried:

if (!IsPostBack)
            {
                UserId.Focus();
                BindTextBoxvalues();
            }

.
I have tried this code. It works only for Userid .I want that if the page loads then cursor should be on userid textbox after entering textbox userid it goes to textbox Password.

See here: How to Control Tab Order in HTML[^]