避免蜂鸣声时,在文本框中输入键preSS [英] Avoid Beep sound when enter keypress in a textbox

查看:155
本文介绍了避免蜂鸣声时,在文本框中输入键preSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您创建一个aspx页面,因为这一项:

When you create an aspx page as this one:

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!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">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>

        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>

    </div>
    </form>
</body>
</html>

您如何才能避免当你在一个文本框,并按下回车键出现这种情况的提示音。

how can you avoid the beep sound that happens when you are in a textbox and hit enter.

在另一方面,我想处理进入安其preSS事件。

On the other hand I would like to handle the enter onkeypress event.

的Tx!

推荐答案

如果它关系到你的听众正在使用的浏览器,那么他们已经习惯了它的发生,因为它发生在你之外其他网站。我会说这是不值得担心 - 有点像人关闭JavaScript。他们知道他们已经得到它关闭,而且他们习惯了缺少某些功能结果的网站。你不能强迫他们打开它,你不能强迫他们把声音关的事情。它的那些经验,包括你已经得到了在Web应用程序接受的。

If it's related to the browser that your audience is using, then they're used to it happening, because it happens on every other site besides yours. I'd say it's not worth worrying about - kind of like people with JavaScript turned off. They know they've got it turned off, and they're accustomed to sites lacking certain functionality as a result. You can't force them to turn it on, and you can't force them to turn the sound thing off. It's one of those experience comprises you've got to accept in web apps.

这篇关于避免蜂鸣声时,在文本框中输入键preSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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