美文网首页
$.post is not a function 说是这个错误j

$.post is not a function 说是这个错误j

作者: 三招六式一把铁斧 | 来源:发表于2017-11-13 20:42 被阅读0次
  1. 原因
    jQuery.noConflict(); //将变量$的控制权移交给JsCOM.js
    var $cr = jQuery("#cr"); //照样使用jQuery类库,只是用jQuery代替了原来的$而已
  2. 解决办法
    jQuery.noConflict(); //将变量$的控制权移交给别的库,也就是$不在表示jquery对象了。
    jQuery.post()直接写也可以。
    jquery的源码如下,看了就会懂了
    var jQuery = window.jQuery = window.$ = function(selector, context) { return new jQuery.fn.init(selector, context);
    };

相关文章

网友评论

      本文标题:$.post is not a function 说是这个错误j

      本文链接:https://www.haomeiwen.com/subject/cvltvxtx.html