<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
一个简单的问题?
比如我有两个文本框 A,B
现在我在A文本框中输了东西,然后想敲一下回车,焦点转到B文本框中.
如何实现?
__________________________________________________________________________
在A的OnKeyDown事件里写
if e.KeyCode == Enter then
TextBoxB.Focus();
end if
__________________________________________________________________________
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyCode = Keys.Enter Then
TextBox2.Focus()
End If
End Sub
__________________________________________________________________________
web 下要用js实现
__________________________________________________________________________
本文介绍了一个简单的编程问题:如何在两个文本框之间通过键盘操作进行焦点切换。提供了使用不同编程语言(如VB.NET和JavaScript)的示例代码。
900

被折叠的 条评论
为什么被折叠?



