找不到源代码的javascript函数调用 [英] Cannot find source of javascript function call

查看:125
本文介绍了找不到源代码的javascript函数调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以我需要在网站上找到一个特定的JavaScript函数的源代码。 (具体细节并不重要,除非没有办法做我所要求的)

Ok, so I need to find the source code of a particular javascript function on a website. (The specifics do not really matter unless there is no way to do what it is that I am asking)

我可以看到html代码链接中的函数调用
onclick =inbox.sendMessage();

I can see the function call in a link of html code onclick="inbox.sendMessage();"

我知道这个功能有效,因为如果我使用一个插件可以调用该页面上的函数,但是,我搜索了该页面中引用的每个.js文件,并且它们都没有包含一个名为sendMessage的函数。

I know that the function does work because if I use a plugin a can call the function on that page, however, I have searched every .js file is referenced in that page, and none of them contain a function called sendMessage.

我问的是,有没有办法将代码重新回到源代码,也许如果有一种方法来调试html并在onclick是触发然后进入函数来查看它的来源,但我不知道我该怎么做,或者甚至是可能的。任何帮助将不胜感激,谢谢。

What I am asking is, is there a way to follow the code back to the source, perhaps if there was a way to debug the html and break when the onclick is triggered and then step into the function to see its source, but I do not know how I can do that or if it is even possible. Any help will be greatly appreciated, Thanks.

推荐答案

我想你可以做:

inbox.sendMessage



<在webconsole中。 (没有括号的函数名称)

它将打印出函数的源代码。

In the webconsole. (the function name without the parenthesis)
It will print out the source code of the function.

这篇关于找不到源代码的javascript函数调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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