如何防止进入按钮? [英] How to prevent from enter button?

查看:58
本文介绍了如何防止进入按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友..

im在网站上工作(ASP.Net,C#)..但我面临的一个问题是,每当我在我的文本框中输入然后如果我按下输入按钮其loged我...而不是我希望它作为搜索操作...如何解决这个..

提前感谢..

hello friends..
i m working on website(ASP.Net,C#)..but i m facing one problem that is whenever i m typing in my textbox and then after if i press enter button its loged out me...instead of that i want that it works as search operation..how to resolve this..
Thankss in advance..

推荐答案

如果没有其他设置(例如JavaScript事件处理程序)覆盖此功能。 Enter正在处理表单上的默认操作,因此被定向到默认按钮(您可以直观地看到它)。



因此您需要检查或更改JavaScript,或更改默认按钮: http://www.w3schools.com/aspnet/prop_webcontrol_panel_defaultbutton.asp [ ^ ]
If no other setting (such as JavaScript event handler) is overriding this feature. "Enter" is handling default action on the form, thus is directed to the default button (you can see it visually).

So you either need to check or change JavaScript, or change default button: http://www.w3schools.com/aspnet/prop_webcontrol_panel_defaultbutton.asp[^]


这篇关于如何防止进入按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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