文字OnChange [英] TEXT OnChange

查看:36
本文介绍了文字OnChange的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从文本编辑的Onchange事件中激活一个JS函数。

不幸的是,当我按任意键时它不会触发,但只有在离开时才会触发/>
控制。我已经尝试过OnKeyup,它有效,但它与

NS6不兼容。


请提出建议吗?


祝你好运。


Bob

I''d like to fire a JS function from the Onchange event of a Text edit.
Unfortunately it doesn''t fire when I hit any key, but only when leaving the
control. I''ve tried with OnKeyup, and it works, but it isn''t compatible with
NS6.

Please any advice ?

Best regards.

Bob

推荐答案

文章< 41 *********************@news.sunrise.ch> ;, bedford1

@ YouKnowWhatToDoHerehotmail.com启发我们...
In article <41*********************@news.sunrise.ch>, bedford1
@YouKnowWhatToDoHerehotmail.com enlightened us with...
我想从文本编辑的Onchange事件中激活一个JS函数。
不幸的是,当我按任意键时它不会触发,但只有在离开
控制。我已经尝试过OnKeyup,它可以工作,但它与NS6不兼容。
I''d like to fire a JS function from the Onchange event of a Text edit.
Unfortunately it doesn''t fire when I hit any key, but only when leaving the
control. I''ve tried with OnKeyup, and it works, but it isn''t compatible with
NS6.




不,onchange不会触发除非焦点离开元素。


尝试onkeypress,取决于你想要完成的事情。有时它是'b $ ba优质替代品,有时它不是。


-

-

~kaeli~

落入装潢机器的人已经完全恢复了b $ b。
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace



No, onchange doesn''t fire unless focus leaves the element.

Try onkeypress, depending on what you''re trying to accomplish. Sometimes it''s
a fine substitute, sometimes it isn''t.

--
--
~kaeli~
The man who fell into an upholstery machine is fully
recovered.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace


OnKeyPress与OnKeyUp相同,它不适用于NS6

我会添加一个额外的窗口。


谢谢


Bob


" kaeli" < TI ****** @ NOSPAM.comcast.net>一个écritdansle message de

新闻:MP ************************ @ nntp.lucent.com ...
OnKeyPress is the same than OnKeyUp, it doesn''t work with NS6
I will add an additional window.

Thanks

Bob

"kaeli" <ti******@NOSPAM.comcast.net> a écrit dans le message de
news:MP************************@nntp.lucent.com...
文章< 41 ********************* @ news.sunrise.ch> ;, bedford1
@YouKnowWhatToDoHerehotmail。 com启发我们...
In article <41*********************@news.sunrise.ch>, bedford1
@YouKnowWhatToDoHerehotmail.com enlightened us with...
我想从文本编辑的Onchange事件中激活一个JS函数。
不幸的是,当我按任意键时它不会触发,但只有在离开
时才能控制。我已经尝试过OnKeyup,它可以工作,但它与NS6不兼容


不,除非焦点离开元素,否则onchange不会触发。 />
尝试onkeypress,取决于你想要完成的事情。有时
I''d like to fire a JS function from the Onchange event of a Text edit.
Unfortunately it doesn''t fire when I hit any key, but only when leaving the control. I''ve tried with OnKeyup, and it works, but it isn''t compatible with NS6.

No, onchange doesn''t fire unless focus leaves the element.

Try onkeypress, depending on what you''re trying to accomplish. Sometimes



它是一个很好的替代品,有时它不是。

-
-
~kaeli~
落入装潢机器的人完全恢复了。
http://www.ipwebdesign.net/wildAtHeart
http ://www.ipwebdesign.net/kaelisSpace



Bob Bedford写道:
Bob Bedford wrote:
OnKeyPress与OnKeyUp相同,


它不完全相同:
http://www.w3.org/TR/html4/interact/...def-onkeypress

它不适用于NS6
OnKeyPress is the same than OnKeyUp,
It''s not quite the same:
http://www.w3.org/TR/html4/interact/...def-onkeypress
it doesn''t work with NS6




因为它们都在w3.org HTML 4.01标准中描述,为什么不用

只是使用它并建议我们获得兼容的浏览器(例如NS7)?


-

Ben M.



Since they are both described in the w3.org HTML 4.01 standard, why not
just use it and advise users to get a compliant browser (such as NS7)?

--
Ben M.


这篇关于文字OnChange的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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