Uncaught TypeError: TableInit is not a constructor
我最近在做东西的时候,用到了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的更多相关文章
- 解决ExtJs Uncaught TypeError: c is not a constructor错误
ExtJs项目使用sencha app build编译以后,浏览时很容易抛出Uncaught TypeError: c is not a constructor的错误,而且会加载没有名称的js,例如 ...
- 微软必应地图加载错误:Uncaught TypeError: Microsoft.Maps.Location is not a constructor
微软必应地图在chrome浏览器加载错误:Uncaught TypeError: Microsoft.Maps.Location is not a constructor, 原因是没有等待地图API加 ...
- 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 ...
- Uncaught TypeError: Cannot read property 'msie' of undefined
因为图方便,抄了别人写的一个jquerry插件,运行时“var pos = ($.browser.msie && parseInt($.browser.version) <= 6 ...
- 360浏览器Uncaught TypeError: object is not a function问题
刚刚360浏览器提示 Uncaught TypeError: object is not a function,找了半天发现问题是我有一个按钮,id和方法重复了,所以提示这个. <input t ...
- 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 || ...
- [Android] Web Console: Uncaught TypeError: Object [object Object] has no method 'xxx'
我们开发的产品,有一部分功能,需要在WebView中打开web页面,然后在web页面中通过js方法回调部分native的功能. 对于web回调native的开发方式,如果不了解的话,可以参考我以前的一 ...
- jQuery-2.1.4.min.js:4 Uncaught TypeError: Illegal invocation
jQuery-2.1.4.min.js:4 Uncaught TypeError: Illegal invocation 此错误与crsf有关
- Uncaught TypeError: _react2.default.findDOMNode is not a function
react 查找某节点时报错 Uncaught TypeError: _react2.default.findDOMNode is not a function 代码: import React, { ...
随机推荐
- kafka数据组织+集群架构
1.数据组织: partition:Kafka的topic可以划分成一个或多个partition,每个partition存储着这个topic的一部分数据. partition副本:若一个topic的副 ...
- Oracle 解决无法生成Snapshot问题
1. 概述 Specify the number of days of snapshots to choose from ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
- (尚012)Vue表单数据的自动手集(表单数据提交,需要收集表单数据)
自动收集,就是我一输入数据,就自动收集,等我点击提交按钮的时候,数据就收集好了 1.使用v-model对表单数据自动收集 1)text/textare----单行/多行输入框 2)checkbox-- ...
- uic
uic user interface complieruic mainwindow.ui >> ui_mainwidow.h
- [luogu 3803]【模板】多项式乘法
传送门 FFT #include<bits/stdc++.h> #define ll long long #define max(a,b) ((a)>(b)?(a):(b)) #de ...
- CF1188B/E Count Pairs(数学)
数同余的个数显然是要把\(i,j\)分别放到\(\equiv\)的两边 $ (a_i + a_j)(a_i^2 + a_j^2) \equiv k \bmod p $ 左右两边乘上\((a_i-a_j ...
- 史上最全java pdf精品书籍整理
算法,多线程,spring,数据库,大数据,面试题等等.喜欢的小伙伴加群获取 QQ群号825199617 (非广告培训技术群,纯java知识交流,请自重)
- MYSQL安装报错需要.NET4.0
MySQL安装,提示需要.NET4.0 解决:下载安装.NET4.0即可 链接:https://pan.baidu.com/s/1u0e0lafBbR0QYEcXFsv9sQ 提取码:q6rr 复制这 ...
- java并发编程学习博客
http://www.blogjava.net/xylz/archive/2010/07/08/325587.html 经典
- Win10安装PyQt5与Qt Designer【转】
https://blog.csdn.net/u011342224/article/details/78879633 1.直接在cmd中通过pip安装PyQt5 1 pip install pyqt5 ...