我如何找到一个元素有什么onChange功能? [英] How can I find what onChange function an Element has?

查看:91
本文介绍了我如何找到一个元素有什么onChange功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面加载了大量的JavaScript文件。在文件的某处,一个onchange处理程序被添加到一个输入字段A中。



当一个值添加到输入字段A中时,输入字段B将自动填入另一个值对于A)的价值。



文件数量和输入域的名称('code','key')使得很难使用grep查找



我试过使用




  • Opera Dragonfly

  • Firefox Firebug

  • Google Chrome开发者工具



但我似乎找不到如何让他们向我显示在哪里可以找到被称为的onchange函数。



任何人都有想法?

解决方案

你可以在firebug DOM检查器中看到jquery表达式,在firefox中使用firequery
https://addons.mozilla.org/en -us / firefox / addon / firequery /


I have a page which loads a lot of JavaScript files. Somewhere in the files, an onchange handler is added to an inputfield A.

When a value is added into inputfield A, inputfield B is automatically filled in with another value (depending on the value of A).

The sheer number of files and the names of the inputfields ('code', 'key') make it hard to use grep to find where the onchange is defined.

I've tried using

  • Opera Dragonfly
  • Firefox Firebug
  • Google Chrome Developer Tools

but I can't seem to find out how to get them to show me where I can find the onchange function that gets called.

Anyone got an idea?

解决方案

you can see the jquery expression in firebug DOM inspector using firequery in firefox https://addons.mozilla.org/en-us/firefox/addon/firequery/

这篇关于我如何找到一个元素有什么onChange功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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