输入类型“提交”表单提交时不会触发OnClick事件 [英] Input Type "Submit" does not trigger OnClick event while form submitting
本文介绍了输入类型“提交”表单提交时不会触发OnClick事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人请帮我找到错误。
我创建了新帐户创建表。单击SignUp按钮OnClick事件不会触发,它不会显示任何错误和警告消息。我不能在这里附上我的编码,因为编码内容非常大。
Any one please help me to find the mistake.
I have created New Account Creation Form. While clicking the SignUp button OnClick event does not triggering and it doesn''t show any error and warning msg. I can''t attach my codings here because coding contents are very large.
推荐答案
你没有指定:onclick
什么元素?无论如何,你没有提供任何代码示例,那么你会期望什么?有可能,您需要处理不同的事件,onsubmit
:
http://www.w3schools.com/jsref/event_form_onsubmit.asp [ ^ ]。
然而,onclick
事件毫无疑问,当然有效。我不知道你怎么能搞砸它,但它可能会发生。 :-)
-SA
You did not specify: "onclick
" of what element? Anyway, you did not provide any code sample, so what would you expect? Chances are, you rather need to handle a different event,onsubmit
:
http://www.w3schools.com/jsref/event_form_onsubmit.asp[^].
However,onclick
event certainly works, no doubt. I don''t know how exactly could you screw up it, but it might happen. :-)
—SA
这篇关于输入类型“提交”表单提交时不会触发OnClick事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文