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, { ...
随机推荐
- centOS下实践查询版本/CPU/内存/硬盘容量等硬件信息
更详细参考: https://blog.csdn.net/dream_broken/article/details/52883883 1.查看内存 DirectMap2M: 33544192 kB [ ...
- Oracle plsql存储过程中out模式参数的用法
在plsql中,存储过程中的out模式的参数可以用来返回数据,相当于函数的返回值.下面是一个小例子. 沿用上一篇的emp表结构和数据. 存储过程如下: create or replace proced ...
- windows下命令行切换目录
1.切换目录 C:\Users\MACHENIKE> cd H:/www C:\Users\MACHENIKE>H: H:\www> 2.查看目录文件 H:\www>dir
- 鼠标经过图片会移动(css3过渡,overflow:hidden)
效果图如下: 代码: <body> <div><img src="jd.jpg"></div> </body> img{ ...
- 复旦高等代数 I(15级)每周一题
[问题2015A01] 证明: 第三类分块初等变换是若干个第三类初等变换的复合. 特别地, 第三类分块初等变换不改变行列式的值. [问题2015A02] 设 $n\,(n\geq 2)$ 阶方阵 ...
- (32)Vue模板语法
模板语法 文本: <span>Message: {{ msg }}</span> v-once 一次性地插值,当数据改变时,插值处的内容不会更新 <span v-once ...
- Java springMVC前端传入字符串、后台接收Date的错误解决
今天在一个基于SSM的项目里出现以下报错 Cannot convert value of type [java.lang.String] to required type [java.util.Dat ...
- Redis恢复数据
对于单点或者集群,都可以用 cat data.txt | redis-cli --pipe方式进行冷恢复. 对于大数据量会很慢,但不会出错.
- 标准ACL详解
- SQL中查询现有未释放连接
SELECT dbid,count() FROM [Master].[dbo].[SYSPROCESSES] WHERE spid> and status='sleeping' group by ...