开发者

How to make the Enter key work like Tab in ASP.Net applications?

开发者 https://www.devze.com 2023-03-22 06:58 出处:网络
I have written a program. When I hit the Enter key, I want the cursor to move between the textboxes as if I had hit the tab k开发者_运维问答ey.How can I do that in ASP.Net?Do it with JavaScript, I rec

I have written a program. When I hit the Enter key, I want the cursor to move between the textboxes as if I had hit the tab k开发者_运维问答ey. How can I do that in ASP.Net?


Do it with JavaScript, I recommend jQuery:

Should be fairly basic. Create a keyboardeventlistener for the Enter key, and then from there trigger a keyboard event for the Tab key. Something like this:

keyboardeventistener(Enter key) {
    jQuery.Event("tab");
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号