我最近在做东西的时候,用到了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. 错误信息: Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:

    这个错误主要原因是:数据库的配置出问题,比如写错库名什么的,仔细检查下.

  2. dedecms织梦第三方登录插件-QQ登录、微博登录、微信登录

    织梦程序集成第三方QQ登录.微博登录.微信登录,获取QQ.微博.微信,并存储至数据库,一键注册为网站会员,不用再次填写绑定信息,方便粘贴用户更强. 织梦第三方登录效果 第三方登录插件特点 1.所有文件 ...

  3. linux服务器初始化(防火墙、内核优化、时间同步、打开文件数)

    #!/bin/bash read -p 'enter the network segment for visiting the server:' ips # 关闭firewalld和selinux s ...

  4. Java【基础学习】之暴力求素数【用数组返回】

    Java[基础学习]之暴力求素数[用数组返回] */ import java.util.*; public class Main{ public static void main(String[] a ...

  5. man、whatis、apropos命令

    man命令类似于Linux的帮助文档. 1.man1提供给普通用户的可执行命令说明: 输入man 1 ls 后,结果如下: 结果分析: (1)NAME:命令的名称: (2)SYNOPSIS:参数的使用 ...

  6. 独立成分分析 ICA 原理及公式推导 示例

    独立成分分析(Independent component analysis) 前言 独立成分分析ICA是一个在多领域被应用的基础算法.ICA是一个不定问题,没有确定解,所以存在各种不同先验假定下的求解 ...

  7. Liskov替换原则(LSP)

    OCP背后的主要机制是抽象和多态.在静态类型语言中,比如C++和Java,支持抽象和多态的关键机制之一是继承.正是使用了继承,才可以创建实现其基类中抽象方法的派生类.是什么设计规则在支配着这种特殊的继 ...

  8. NumPyArray

    import arcpy import numpy # Create a simple array from scratch using random values myArray = numpy.r ...

  9. revenue

    美 ['revənju]   英 ['revənjuː]   n.收益:营业额:税务署 网络收入:税收:岁入

  10. Linux测试硬盘读性能的常用工具-hdparm

    通常情况下可以使用fdisk.df等命令查看硬盘的分区情况以及当前已使用空间大小.剩余空间大小等信息.但是如果要查看硬盘的硬件信息如 硬盘型号.序列号.已运行时间等信息该用什么工具查看呢? 在Linu ...