本文为博主原创,未经允许不得转载:

在用bootstrap做一个日期插件的时候,代码和js,css等都是拷贝网上下载下来的实例,但是在

调试的时候,浏览器控制台一直报错 Uncaught TypeError: $(...).datetimepicker is not a function。

由于直接引用别人的代码,且别人的代码是可行的,为什么在我这边不行,上网搜了很多,且大多是

一些外文网站的,然后就在本地调试,查看引用js代码实现的方式,发现也没问题。最后调换了以下引用

的两个js的顺序就ok了,将代码展示如下:

就是上图中第二个和第三个的顺序放反了,然后就一直加载不出来,调换过来就ok了

js代码如下:

  <script type="text/javascript">
$(document).ready(function() {
updateConfig();
function updateConfig() {
$('#datePickerSelect').daterangepicker({
"startDate": "12/01/2017",
"endDate": "12/07/2018"
}, function(start, end, label) {
console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')");
});
}
});
</script>

Uncaught TypeError: $(...).daterangepicker is not a function的更多相关文章

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

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

  2. Uncaught TypeError: download is not a function at HTMLAnchorElement.onclick (index.html:25)

    前段时间调试html报了这样的一个错误 Uncaught TypeError: download is not a function     at HTMLAnchorElement.onclick ...

  3. “Uncaught TypeError: string is not a function”

    http://www.cnblogs.com/haitao-fan/archive/2013/11/08/3414678.html 今天在js中写了一个方法叫做search(),然后点击按钮的时候提示 ...

  4. chrome浏览器Uncaught TypeError: object is not a function问题解决

    今天测试多浏览器的时候,chrome浏览器出现Uncaught TypeError: object is not a function: 解决办法:(不知道为啥子)改一下js的方法名字就可以了

  5. Uncaught TypeError: undefined is not a function

    index.html <script src="resources/sap-ui-core.js" id="sap-ui-bootstrap" data- ...

  6. Fatal error: Uncaught Error: Call to a member function bind_param() on boolean

    1.2019年10月22日 PHP写mysqli 预编译查询的时候报错. Fatal error: Uncaught Error: Call to a member function bind_par ...

  7. js Uncaught TypeError: undefined is not a function

    如下代码: var columns={}; var column={}: column.name='张三'; columns.push(column); 会出现Uncaught TypeError: ...

  8. Google Chrome Uncaught TypeError: object is not a function

    <html> <script type="text/javascript"> function testForm(){ alert("hello ...

  9. Uncaught TypeError: $(…).orgcharts is not a function

    调整js顺序没有解决,最后增加NoConflict解决,注意红色部分 function initorgcharts() { var $jq = jQuery.noConflict(true); org ...

随机推荐

  1. mysql 内置功能 存储过程 目录

    mysql 内置功能 存储过程介绍 mysql 内置功能 存储过程 创建无参存储过程 mysql 内置功能 存储过程 创建有参存储过程 mysql 内置功能 存储过程 删除存储过程

  2. ubuntu 安装ftp nginx tomcat,mysql

    tomcat sudo apt-get install tomcat 访问方式,http://loclahost:8080 进入sbin目录下 sudo ./startup.sh开启 sudo ./s ...

  3. 什么是anaconda【转载】

    转自:https://zhidao.baidu.com/question/525102108723657245.html https://zhidao.baidu.com/question/62475 ...

  4. Andrew Ng-ML-第十二章-机器学习系统设计

    1.确定执行的优先级 图1.邮件垃圾分类举例 选择100个单词作为指示是否是垃圾邮件的指标,将这些单词作为特征向量,只用0/1表示,出现多次也只用1表示,特征变量用来表示邮件. 通常情况下,会选择训练 ...

  5. jmeter bean shell断言加密的响应信息(加密接口测试二)

    断言加密的响应信息 1.在http请求-->添加-->断言-->bean shell 断言 import com.changfu.EncryptAndDecryptInterface ...

  6. smali注入常用代码

    注入代码需要注意寄存器个数.1.插入log信息 const-string v2,"SN" invoke-static {v2,v0}, Landroid/util/Log;-> ...

  7. 使用TreeView加载XML文件

    PS: 由于小弟初学编程,本文只写实现方式,代码写的不是很好请见谅! 1.需要读取的xml文档内容 2. 最终实现效果 3  貌似看起实现起来很复杂 但是想想还是挺简单 思路:  读取XML文档 →获 ...

  8. 强大的chrome(1)以acfun为例抓取视频

    chrome很强大,很强大,很强大. 想要了解他的强大呢,就先要掌握一些基本的chrome命令. 1. chrome://flags   可用来启用或者关闭某些chrome的体验特性   2. chr ...

  9. linux常用命令:top 命令

    top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,类似于Windows的任务管理器.下面详细介绍它的使用方法.top是 一个动态显示过程,即可以通过用户按键来不断刷 ...

  10. python进程同步,condition例子

    #coding=utf-8import multiprocessing as mpimport time def consumer(cond):    with cond:        print ...