我最近在做东西的时候,用到了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. 【二分答案】Expanding Rods POJ 1905

    题目链接:http://poj.org/problem?id=1905 题目大意:原长度为L的线段因受热膨胀为一段弧,线段L.弧长L'.温度n.膨胀率c满足L' =(1+n/c)*L;求线段的中点移动 ...

  2. MySQL Create table as / Create table like

    a.create table like方式会完整地克隆表结构,但不会插入数据,需要单独使用insert into或load data方式加载数据 b.create table as  方式会部分克隆表 ...

  3. Openwrt路由器上开发微信公众号应用

    利用nohup命令创建启动服务 nohup, /dev/null 2>&1,输出重定向 http://www.cnblogs.com/taosim/articles/2610170.ht ...

  4. 模板 - 数据结构 - 链表/LinkedList

    一个只供删除的双向链表,为了简单不再引入head节点,而且也不进行next的套娃操作.空间使用略微多了一些,但是无伤大雅. struct LinkedList { static const int M ...

  5. Java学习个人备忘录之入门基础

    临时配置环境方式:查看path下的环境变量 set path修改path下的环境变量 set path=haha删除path下的环境变量 set path=查看当前java的版本 javac -ver ...

  6. Shell同步数据到oracle数据库

    某数据库有几张表更新,本地数据库增量更新数据,用脚本定时执行实现. 由于无blob/clob字段,使用sqlldr导入数据:查询目的数据库,以"|"分割导出所有数据,保存在./da ...

  7. php手记之08-tp5中间件

    01-创建中间件 php think make:middleware 中间件的名称 这个指令会 application/http/middleware目录下面生成一个中间件文件. 02-注册中间件三种 ...

  8. Social GAN: Socially Acceptable Trajectories with Generative Adversarial Networks

    Social GAN: Socially Acceptable Trajectories with Generative Adversarial Networks 2019-06-01 09:52:4 ...

  9. 【一】SpringMVC框架原理

    springmvc基础知识 1.什么是springMVC 2.springMVC框架原理(掌握) 前端控制器.处理器映射器.处理器适配器.视图解析器 3.springmvc入门程序 目的:对前端控制器 ...

  10. RabbitMQ之Topic交换器模式开发

    Topic交换器,即主题模式,进行规则匹配. 一.Provider 配置文件 spring.application.name=provider spring.rabbitmq.host=192.168 ...