JS - 检查哪个函数包含特定的字符串

时间:2016-10-10 16:01:49

标签: javascript html string

我正在尝试使用JS对Html内容进行一些解析。 我需要找到哪个函数包含特定的字符串,例如:

currentGroup.__testButtonOnClick = function () {
            if (currentGroup.__testButton) {
                currentGroup.__testButton.removeFromParent();
                currentGroup.__testButton = null;
            }

            window.location.href = 'http://test.com';
        };

我正在寻找的输出是“__testButtonOnClick”,我想避免手动解析而是使用一些JS API,有谁知道最好的方法是什么?

0 个答案:

没有答案