使用Firebug查找JS函数 [英] Find js function with firebug

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

问题描述

我有以下按钮:

<input type="submit" id="btnLogin" onclick="return ValidateLogin();" value="Enter">

如何使用Firebug查找ValidateLogin()函数的定义?

How can i find the definition of the ValidateLogin() function with firebug?

推荐答案

在Firebug控制台中键入以下内容,然后在输出窗口中单击function()

Type the following into the Firebug Console, then click the function() in the output window

var s = ValidateLogin.prototype.constructor;
console.log(s); // will output the actual function definition 

我提供了一些屏幕快照以提供帮助.

I have included some screenshots to help.

这篇关于使用Firebug查找JS函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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