用户按Enter键时如何提交表单 [英] How to submit a form when user presses Enter key

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

问题描述

我在php和web上都很擅长,所以请温柔地对待我。


当用户按下Enter时,我正试图让表单提交

键。我不想使用javascript。我已经用谷歌搜索到了死亡和

无法找到答案(只有提示),除了''专家改变''

页面,你必须付钱给得到答案:-(


为什么在我们生活的开源世界中这是一个秘密?


Daniel Klein

解决方案



" Daniel Klein" da ***** @ featherbrain.netwrote in message

news:ts ******************************** @ 4ax.com ...
< blockquote class =post_quotes>
我在php和web上都很陌生,所以请温柔地对待我。


我想要一张表格当用户按下Enter

键时提交。我不想使用javascript。我已经用Google搜索了这个并且

无法找到答案(仅提示),除了''专家改变''

页面,你必须付钱才能得到答案:-(


为什么这是一个秘密在开源世界中我们住在哪里?


Daniel Klein





如果您有表格根据提交按钮,然后ENTER将提交

表格。

不确定所有OS-en或浏览器BTW。


Richard。


Daniel Klein写道:


我很擅长php和web的东西所以请对我温柔。


当用户按下Enter

键时,我正试图提交表单。我不想使用javascript。我已经用谷歌搜索到了死亡和

无法找到答案(只有提示),除了''专家改变''

页面,你必须付钱给得到答案:-(


为什么在我们生活的开源世界中这是一个秘密?


Daniel Klein



我认为这是浏览器特定的事情。


不确定,但某些提交按钮不起作用的网站firefox

或safari,会在safari上提交,但不会在firefox上提交..


可悲的是我怀疑JavaShite是唯一的解决方案。



2008年1月15日星期二20:07:29 +0100,Richard写道:


>

" Daniel Klein" da ***** @ featherbrain.netwrote in message

news:ts ********** ********************** @ 4ax.com ...


>我''我在php和web上很新,所以请保持温柔和我一起。

我正在尝试在用户按下Enter
键时提交表单。我不想使用javascript。我已经用Google搜索了这个并且无法找到答案(只有提示),除了专家排行页面之外你必须付钱才能得到答案: - (

为什么在我们生活的开源世界中这是一个秘密?

Daniel Klein



你好,

如果您有一个带有提交按钮的表单,那么就我所知,ENTER将提交

表格。

不确定所有操作系统-en或浏览器BTW。



我倾向于同意这一点......我使用了一个阻止它的功能

这样做。


专家交流是我黑名单中的一个网站...永远不要相信一个名为expert sexchange的域名技术网站。 。

-

我告诉过你这件事会发生。


I''m pretty new at php and web stuff so please be gentle with me.

I''m trying to get a form to submit when the user presses the Enter
key. I do not want to use javascript. I''ve googled this to death and
cant find the answer (only hints), except on the ''Experts Exhange''
page and you have to pay to get the answer :-(

Why is this such a secret in the open source world we live in?

Daniel Klein

解决方案


"Daniel Klein" <da*****@featherbrain.netwrote in message
news:ts********************************@4ax.com...

I''m pretty new at php and web stuff so please be gentle with me.

I''m trying to get a form to submit when the user presses the Enter
key. I do not want to use javascript. I''ve googled this to death and
cant find the answer (only hints), except on the ''Experts Exhange''
page and you have to pay to get the answer :-(

Why is this such a secret in the open source world we live in?

Daniel Klein

Hi,
If you have a form with a submit button, then ENTER will submit the
form as far as I know.
Not sure about all OS-en or browsers BTW.

Richard.


Daniel Klein wrote:

I''m pretty new at php and web stuff so please be gentle with me.

I''m trying to get a form to submit when the user presses the Enter
key. I do not want to use javascript. I''ve googled this to death and
cant find the answer (only hints), except on the ''Experts Exhange''
page and you have to pay to get the answer :-(

Why is this such a secret in the open source world we live in?

Daniel Klein

I think this is a browser specific thing.

Not sure, but some sites where the submit button don''t work on firefox
or safari, will submit on safari, but not on firefox..

Sadly I suspect JavaShite is the only solution.



On Tue, 15 Jan 2008 20:07:29 +0100, Richard wrote:

>
"Daniel Klein" <da*****@featherbrain.netwrote in message
news:ts********************************@4ax.com...

>I''m pretty new at php and web stuff so please be gentle with me.

I''m trying to get a form to submit when the user presses the Enter
key. I do not want to use javascript. I''ve googled this to death and
cant find the answer (only hints), except on the ''Experts Exhange''
page and you have to pay to get the answer :-(

Why is this such a secret in the open source world we live in?

Daniel Klein


Hi,
If you have a form with a submit button, then ENTER will submit the
form as far as I know.
Not sure about all OS-en or browsers BTW.

I''d tend to agree with that... I use a function that prevents it from
doing so.

Experts Exchange is one of the sites in my blacklist... never trust a
technical site whose domain is pronounced "expert sexchange".
--
I told you this was going to happen.


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

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