【问题标题】:Firefox/Firebug: Console.log("..."); causes TypeError: Console.log is not a functionFirefox/Firebug: Console.log("...");导致 TypeError: Console.log 不是函数
【发布时间】:2016-07-27 21:54:40
【问题描述】:

我找不到解决办法。我看过this previous question among others。

我的代码很简单:

$(function(){
    Console.log("Starting");
});

我打开了 firebug,选择了 Console 选项卡,并选择了“JS”和“Logging”选项。我收到这两个错误:

jQuery.Deferred 异常:Console.log 不是函数

TypeError: Console.log 不是函数

可能出了什么问题?

【问题讨论】:

  • 因为它是console.log

标签: javascript jquery firefox firebug console.log


【解决方案1】:

您使用的是 C 而不是 c:

$(function(){
    console.log("Starting");
});

Javascript 函数和变量区分大小写。

【讨论】:

    猜你喜欢
    • 2017-06-16
    • 2017-06-15
    • 1970-01-01
    • 2014-04-26
    • 1970-01-01
    • 2015-09-09
    • 2019-05-10
    • 1970-01-01
    • 2011-05-27
    相关资源
    最近更新 更多