从文本框的javascript数据调用事件时获取空白 [英] when calling an event from javascript data of textbox gets blank

查看:77
本文介绍了从文本框的javascript数据调用事件时获取空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我的问题是,当我从javascript调用事件时,文本框的数据为空.谁能帮忙??

Dev ..

hi guys,
my problem is when i call an event from javascript then the data of textbox gets blank. can anyone help ??

Dev..

推荐答案

您永远不会调用事件.您只能在代码中处理事件.浏览器不会调用事件,而是调用事件处理程序.您可以调用处理程序函数,这与调用任何其他函数没有什么不同.

因此,1)事件名称可能会拼写错误; 2)事件处理程序的调用可能拼写错误; 3)可以在您期望的某些处理发生之前在事件处理程序中引发异常,或者在您的方法中写入其他错误信息; 4)永远不会触发事件,因为您不了解触发此事件的条件,并且从未尝试通过用户操作触发此事件.

没有您的代码(什么代码!?您甚至没有告诉我们这是什么事件),没有人可以告诉您确切的错误是什么,但是应该是上面列出的一项或多项.

祝你好运,
—SA
You never call an event. You can only handle a event in your code. Not event but an event handler is called by your browser. You can call the handler function, bit this is no different from calling of any other function.

So, 1) event name can be misspelled; 2) the call of event handler could be misspelled; 3) an exception can be thrown in event handler before some processing you expect happens, or something else is wrong is written in your method; 4) an even is never fired because you did not understand the condition of firing this event and you never tried to fire this event through user actions.

Without you code (what code!? you did not even tell us what kind of event is that), nobody can tell you what exactly was wrong, but is should be one or more items listed above.

Good luck,
—SA


这篇关于从文本框的javascript数据调用事件时获取空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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