编码以自动将光标放在.net中的下一个文本框中 [英] Coding to get cursor automatically on next textbox in .net

查看:49
本文介绍了编码以自动将光标放在.net中的下一个文本框中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

滚动没有。 (文本框。)

名称(文本框。)

english(文本框。)

maths(文本框。)





更新(按钮)取消(按钮)



插入(按钮)修改(按钮)删除(按钮)退出(按钮)



我的程序表格一个以上。



在第一个文本框initallay那里是1号,当我们按下输入时,我们将光标放入下一个文本框....





plz帮我编码。 。





用于数据库编码。



我尝试了什么:



i没试过,因为我不明白我已经第一次这样做了..







所以请帮助我..

解决方案

First of所有。设置所有按钮属性UseSubmitBehavior =false因为当您输入按钮时,将触发click事件。之后在onkeydown事件上调用javascript方法并检查其keycode。如果keycode = 13则焦点到下一个文本框。

例如请点击以下链接。



http://www.aspdotnet-suresh.com/2013/02/javascript-automatically-move-cursor-to .html [ ^ ]

按Enter键[Return]进入下一个文本框ASP.NET [ ^ ]

javascript - 如何进入下一个按下输入时的文本框? - 堆栈溢出 [ ^ ]





问候,

AARIF SHAIKH

roll no. ( textbox.)
name ( textbox.)
english ( textbox.)
maths ( textbox.)


Update(button) Cancel(button)

Insert(button) Modify(button) Delete(button) Exit(button)

Form of my Program above one.

in first textbox initallay there is 1 number and when we press enter we get cursor into next text box....


plz help me for this coding..


IT IS FOR DATABASE CODING.

What I have tried:

i had not try any because i dont understand this i have do this for 1st time..



So please help me..

解决方案

First of all. set all button property UseSubmitBehavior="false" because when you enter buttton click event will fired. after that call javascript method on onkeydown event and check its keycode . if keycode=13 then focus to next textbox.
for example please follow below links.

http://www.aspdotnet-suresh.com/2013/02/javascript-automatically-move-cursor-to.html[^]
Move to next textbox by pressing Enter Key[Return] in ASP.NET[^]
javascript - How to go to next textbox when enter is pressed? - Stack Overflow[^]


Regards,
AARIF SHAIKH


这篇关于编码以自动将光标放在.net中的下一个文本框中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆