首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未明的TypeError:对象函数

未明的TypeError:对象函数
EN

Stack Overflow用户
提问于 2013-12-27 17:31:12
回答 1查看 630关注 0票数 0

我正在尝试在web程序中实现ChatJS (chatjs.net)。当我添加所有脚本并使用以下代码时:

代码语言:javascript
复制
  $.chat({
    // your user information
    user: {
        Id: 3,
        Name: 'John Silver',
        ProfilePictureUrl: 'http://www.foo.com/avatar/123'
    },
    // text displayed when the other user is typing
    typingText: ' is typing...',
    // the title for the user's list window
    titleText: 'ChatJS demo chat',
    // text displayed when there's no other users in the room
    emptyRoomText: "There's no one around here.",
    // the adapter you are using. There are 2 implementations out of the box:
    // SignalRAdapter and LongPollingAdapter (server independent).
    adapter: new LongPollingAdapter()
});

web浏览器抛出一个错误:

代码语言:javascript
复制
Uncaught TypeError: Object function (e,n){return new x.fn.init(e,n,t)} has no method 'chat' localhost:8000/try2/:253 (anonymous function)

我怎么才能解决这个问题?如果这个问题不容易解决,有人能推荐一个类似的开源程序吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-12-31 15:42:43

在重新检查代码之后,我意识到我忘记了包含一个JS库。我把它包括进去后,它就开始起作用了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20805080

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档