我最近在做东西的时候,用到了Bootstrap的表格,我复制了一份代码使用,结果运行报错

Uncaught TypeError: TableInit is not a constructor

我点进去一看,定位如下

var oTable = new TableInit();

其实这种错误,没办法调试,但是错误一般都是你少写了) } 或者写错了位置

就比如我这次,就是写错了位置

<script type="text/javascript">
$(function() {
//1.初始化Table
var oTable = new TableInit();
oTable.Init();
//2.初始化Button的点击事件
var oButtonInit = new ButtonInit();
oButtonInit.Init();
}) var TableInit = function() {
var oTableInit = new Object();
//初始化Table
oTableInit.Init = function() {

应该把TableInit方法放到Jquery的函数之外

Uncaught TypeError: TableInit is not a constructor的更多相关文章

  1. 解决ExtJs Uncaught TypeError: c is not a constructor错误

    ExtJs项目使用sencha app build编译以后,浏览时很容易抛出Uncaught TypeError: c is not a constructor的错误,而且会加载没有名称的js,例如 ...

  2. 微软必应地图加载错误:Uncaught TypeError: Microsoft.Maps.Location is not a constructor

    微软必应地图在chrome浏览器加载错误:Uncaught TypeError: Microsoft.Maps.Location is not a constructor, 原因是没有等待地图API加 ...

  3. vue项目报错1 Vue is a constructor and should be called with the `new` keyword && jquery.js?eedf:3850 Uncaught TypeError: this._init is not a function...

    Vue is a constructor and should be called with the `new` keyword Uncaught TypeError: this._init is n ...

  4. Uncaught TypeError: Cannot read property 'msie' of undefined

    因为图方便,抄了别人写的一个jquerry插件,运行时“var pos = ($.browser.msie && parseInt($.browser.version) <= 6 ...

  5. 360浏览器Uncaught TypeError: object is not a function问题

    刚刚360浏览器提示 Uncaught TypeError: object is not a function,找了半天发现问题是我有一个按钮,id和方法重复了,所以提示这个. <input t ...

  6. Jquery报错:Uncaught TypeError: ((m.event.special[e.origType] || (intermediate value)).handle || e.handler).apply is not a function

    页面中出现了Jquery报错:Uncaught TypeError: ((m.event.special[e.origType] || (intermediate value)).handle || ...

  7. [Android] Web Console: Uncaught TypeError: Object [object Object] has no method 'xxx'

    我们开发的产品,有一部分功能,需要在WebView中打开web页面,然后在web页面中通过js方法回调部分native的功能. 对于web回调native的开发方式,如果不了解的话,可以参考我以前的一 ...

  8. jQuery-2.1.4.min.js:4 Uncaught TypeError: Illegal invocation

    jQuery-2.1.4.min.js:4 Uncaught TypeError: Illegal invocation 此错误与crsf有关

  9. Uncaught TypeError: _react2.default.findDOMNode is not a function

    react 查找某节点时报错 Uncaught TypeError: _react2.default.findDOMNode is not a function 代码: import React, { ...

随机推荐

  1. [Javascript] Avoid Accidental Returns of New State by using the void Keyword

    For example we have a 'useState' function, which takes a state and a function to update the state: c ...

  2. 常用的两种web单点登录SSO的实现原理

    单点登录SSO(Single Sign On)说得简单点就是在一个多系统共存的环境下,用户在一处登录后,就不用在其他系统中登录,也就是用户的一次登录能得到其他所有系统的信任.单点登录在大型网站里使用得 ...

  3. Oracle NVL 函数 nvl nvl2

    Oracle中函数以前介绍的字符串处理,日期函数,数学函数,以及转换函数等等,还有一类函数是通用函数.主要有:NVL,NVL2,NULLIF,COALESCE,这几个函数用在各个类型上都可以. 下面简 ...

  4. postgresql 修改用户密码

    本文链接:https://blog.csdn.net/pg_hgdb/article/details/79202912如果客户端认证方式为密码验证,那么必然会涉及到修改密码   如何安全地修改密码: ...

  5. php.exe文件

    一.正常情况PHP文件的访问需要通过浏览器,访问Apache,才能运行一个php文件 php文件在Apache文件夹的站点根目录里 浏览器通过域名文件的形式访问 二.通过浏览器在不需要Apache服务 ...

  6. Oracle误删除数据恢复。Oracle删除后恢复数据

    发现误删除时需要及时处理,速度要快,姿势要帅.晚了就恢复不了额 1.查询时间 以确保恢复到某个时间点 select SQL_TEXT, LAST_ACTIVE_TIME from v$sqlarea ...

  7. docker安装postgresql

    1.在linux执行以下代码: docker run -p : -v /home/docker/postgresql/data:/var/lib/postgresql/data -e POSTGRES ...

  8. 在Windows下编译Cef3.2623并加入mp3、mp4支持(附带源码包和最终DLL)《转》

    https://blog.csdn.net/zhuhongshu/article/details/54193842 源码包下载地址:点我下载 最终Dll.Lib.PDB.头文件下载地址(release ...

  9. Binder 原理剖析***

    一. 前言 希望更加深入理解 Binder 实现机制的,可以阅读文末的参考资料以及相关源码. 二. Binder 概述 简单介绍下什么是 Binder.Binder 是一种进程间通信机制,基于开源的 ...

  10. Genome Aggregation Database (gnomAD) 简介 | 参考人群等位基因频率数据库

    Genome Aggregation Database (gnomAD) 这是一个关于什么的数据库?broad institute开发的,整合了目前几乎所有的公共的WES和WGS测序数据,并对数据做了 ...