今天弄好久。直接拿例子吧。
function addWatchItem(param1,param2){
$.ajax({
url : 'addWatchItem.html',
data : {auctionItemId: param1, flag:param2},
success : function(data){
if(data=="error"){
alert("内部错误!");
return false;
}
}
});
}
按照我们的写法习惯。我写成了$.ajax 但是一直报错。。包的错误为has no method 'ajax'
后来在google上查找
Looking at the definition of$
in
your code, it seems like you're using the Prototype framework as well. A problem when using multiple libraries is that they are overwriting variables, mainly the$
.
In your case, usejQuery
instead
of$
(sojQuery.ajax(...)
),
or usejQuery.noConflictto restore the$
back
to the jQuery one.
将如上代码 中的$改为 jquery
即:
function addWatchItem(param1,param2){
jquery.ajax({
url : 'addWatchItem.html',
data : {auctionItemId: param1, flag:param2},
success : function(data){
if(data=="error"){
alert("内部错误!");
return false;
}
}
});
}
神奇的好了。
分享到:
相关推荐
python3 server.py 127.0.0.1 8888 ...AttributeError: module ‘os’ has no attribute ‘exit’ 部分代码入下: from socket import * import sys,os #实现登录 def do_login(s,user,name,addr): for i in user: i
AttributeError: module 'tensorflow.compat.v1' has no attribute 'contrib'的问题您具体怎么解决问题具体解决的seq_loss.py文件
调试递归神经网络(RNN)的时候出现如下错误: AttributeError: module 'tensorflow.contrib.rnn' has no attribute 'core_rnn_cell' 顺便问一句,资源分怎么设置免费啊
翻译过来是类型为“type”的TypeError对象没有len(),我报错的代码是: #coding=utf-8 print(请输入一个字符串:) a = input('') #回文的长度至少为2 if len(str) < 2: print('请不要输入空字符串!...
解决eclipse中查看android工程代码出现android.jar has no source attachment
NULL 博文链接:https://wuhuizhong.iteye.com/blog/2228085
解决On no!Something has gone wrong.
TypeError: loop of ufunc does not support argument 0 of type Tensor which has no callable arctan method 报错行 self.u = np.round(np.dot(self.F, self.u)) #或者 self.u = np.round(self.u + np.dot(K, ...
问题描述及解决: 原创文章 1获赞 1访问量 17 关注 私信 展开阅读全文 作者:Branson233
关于用GrADS命令”sdfopen” 打开 .nc 文件出现的“SDF file has no discernable X co
wireless has no clothes! 网络安全
补充知识:Pandas使用DataFrame出现错误:AttributeError: ‘list’ object has no attribute ‘astype’ 在使用Pandas的DataFrame时出现了错误:AttributeError: ‘list’ object has no attribute ‘astype’ 代码...
如图示,会出现如AttributeError: ‘DataParallel’ object has no attribute ‘xxx’的错误。 原因:在使用net = torch.nn.DataParallel(net)之后,原来的net会被封装为新的net的module属性里。 解决方案:所有在...
webdriver不能启动chrome浏览器,报module ‘selenium.webdriver’ has no attribute”问题解决办法 1、先配置下环境变量(谷歌浏览器为例) 步骤:下载好浏览器驱动chromedriver.exe(下载地址:...
无需降级scipy的情况下解决AttributeError: module ‘scipy.misc’ has no attribute ‘imread’, AttributeError: module ‘scipy.misc’ has no attribute ‘imresize’, AttributeError:module ‘scipy.misc’ ...
多线程爬虫出现报错AttributeError: ‘NoneType’ object has no attribute ‘xpath’一、前言二、问题三、思考和解决问题四、运行效果 一、前言 mark一下,本技术小白的第一篇CSDN博客! 最近在捣鼓爬虫,看的是...
主要跟大家介绍了关于在Python3下错误AttributeError: 'dict' object has no attribute 'iteritems'的分析与解决方法,文中介绍的非常详细,对大家具有一定的参考学习价值,需要的朋友们下面来一起看看吧。
这个问题是py2和py3兼容性的问题 在py2中,判断key是否属于dict的写法可以是: d={'name':'abc','location':'BeiJing'} ...补充知识:快速解决出现class object has no attribute ‘ functiong’ or ‘var
问题解决:AttributeError: module ‘paddle.fluid’ has no attribute ‘EndStepEvent’问题描述解决思路问题解决 问题描述 在使用paddle.fluid导入EndStepEvent过程中 global step if isinstance(event, fluid....
In versions 2 and up, no XML is actually used (instead, it has been replaced with "JSON"), but for brand purposes, the name has been kept. It still uses the XMLHTTPRequest object, so the name does ...