当前位置:编程学习 > JS >>

jQuery---Could not convert JavaScript argument

<script src = "jquery-1.4.3.js" type = "text/javascript"></script> <script language = "javascript" type = "text/javascript"> window.onload = function(){ var a = []; var t1 = new Date(); var $ = document.getElementById; for(var i = 0;i<1000;i++){ var span = document.createElement("span"); span.setAttribute("id","span"+i); document.getElementsByTagName("body")[0].appendChild(span); } for(var j=0;j<1000;j++){ var b = $("#span"+j); a.push(b); } var t2 = new Date(); alert(t2-t1); } </script> FireBug中会有Could not convert JavaScript argument这个错误提示,需要怎么样才能修正?
追问:我是想自己定义一个$覆盖jQuery中内置了的$
可是偏偏我去掉就好~~~~~纠结~~~~~不懂不懂啊jQuery和杀毒软件有~~神马关系~~~我没有装卡巴的杀毒软件额~~~
答案:var $ = document.getElementById;
不需要这样声明,jQuery库就已经内置好了。
其他:也出问题了,每次一打开就说could not convert javascript argument creat- Dear all, We confirm the problem with bad updates, currently 老问题啦兄弟。

卡巴的安全专家放出更新中断的解释(已解决更新中断的问题)
:是由于卡巴服务器更新文件错误导致中断。
关闭自我保护,删除C:\Documents and Settings\All Users\Application Data\Kaspersky Lab\AVP6\Data\updcfg.xml 。卡巴正在恢复更新服务器,估计很快就好了!(目前已经可以更新了!)
也可用官方提供的这个小工具

以下是官方外文解释,有兴趣看看:
-------
Dear all, 

We confirm the problem with bad updates, currently we are rolling back the updates on all servers. 
To correct the problem please delete this file

C:Documents and SettingsAll UsersApplication DataKaspersky LabAVP6Dataupdcfg.xml 
and update a little later. 

A utility for correction of this will be created asap. It will delete the file automatically. (a better way of correction for not advanced PC users).

Also you need to disable self-Defence in Settings -> Service -> Self-Defence. Otherwise the product will not allow to delete the file. 

Sorry for the inconvenience. 

Kind regards,
Igor Kurzin
----



 

上一个:javascript 特定区域内搜索标记
下一个:有了javascript源代码 可以不学javascript了吗

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,