如何使用asp.net回车键提交表单 [英] How to submit a form using the Enter key in asp.net

查看:142
本文介绍了如何使用asp.net回车键提交表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个形式3个按键。其中之一是提交按钮。我怎样才能使它的默认按钮被点击时,我preSS回车键。是否有一个属性呢?

I have 3 buttons in a form. One of them is the submit button. How can I make it the default button to be clicked when I press the enter key. Is there a property for this?

推荐答案

有是表单属性:defaultbutton

There is a property for the form: defaultbutton.

<form runat="server" defaultbutton="myButton">
...
</form>

这是在ASP.NET 2.0中首次实现的。

It is first time implemented in ASP.NET 2.0.

这篇关于如何使用asp.net回车键提交表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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