按ASP.NET中的Enter键[Return]移动到下一个文本框 [英] Move to next textbox by pressing Enter Key[Return] in ASP.NET

查看:56
本文介绍了按ASP.NET中的Enter键[Return]移动到下一个文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的webform有3个文本框。

我想按Enter键移动文本框。

使用asp.net或javascript或其他任何内容。



我在google中找不到任何有效的东西。



请帮助

My webform has 3 textboxes.
I want to move through textboxes by pressing Enter Key.
using asp.net or javascript or anything else.

I didn''t find anything in google that works.

Please help

推荐答案



在下面找到你的解决方案。

Hi,
Find your solution below.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TextBoxEnterbox.aspx.cs" Inherits="TextBoxEnterbox" %>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>

<title></title>

<script type="text/javascript">


document )。ready( function (){

// <温泉n class =code-comment>将焦点设置在第一个文本框
(document).ready(function() { // Setting focus on first textbox


' 输入:文本:第一')聚焦();

// 将keydown事件绑定到文本框
('input:text:first').focus(); // binding keydown event to textbox


这篇关于按ASP.NET中的Enter键[Return]移动到下一个文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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