【发布时间】:2010-09-13 06:28:35
【问题描述】:
我在 localhost 中开发了一个网站。我正在使用 jquery、一些 javascripts、CSS 和 HTML。 当我尝试使用 IE 加载站点时,会弹出一条错误消息,提示“第 12 行内存不足”。我单击“确定”,它继续正常工作。但是,该消息未显示在 Chrome 或 Firefox 中。 谁能告诉我为什么会这样。我该如何解决它??
编辑:我删除了 jquery ui 包含行,它停止显示错误。 (删除下面的行)
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
我的 Javascript 代码。
<script type="text/javascript">
$(document).ready(function() {
$("ul.blockeasing li.main").mouseover(function(){ //When mouse over ...
//Following event is applied to the subnav itself (making height of subnav 60px)
$(this).find('.subnav').stop().animate({height: '60px', opacity:'1'},{queue:false, duration:1500, easing: 'easeOutElastic'})
});
$("ul.blockeasing li.main").mouseout(function(){ //When mouse out ...
//Following event is applied to the subnav itself (making height of subnav 0px)
$(this).find('.subnav').stop().animate({height:'0px', opacity:'0'},{queue:false, duration:1600, easing: 'easeOutElastic'})
});
//menu itembackground color animation
$("ul.blockeasing li").hover(function() {
$(this).stop().animate({ backgroundColor: "#C13D93"}, 600);},
function() {
$(this).stop().animate({ backgroundColor: "#de93c3" }, 600);
});
});
</script>
【问题讨论】:
-
你要执行什么代码,哪个版本的IE?
-
没什么重要的.. 就是这样:
-
我正在尝试执行 PHP 代码。 IE v 8。
-
根据您提供的信息,我们可能得出的最好结论是您在第 12 行的内存不足。但您可能已经知道,因此可能值得考虑给我们一点更多信息 :-) 比如文件的前 20 行。
-
@ptamzz,请发布 JavaScript 代码,而不是 PHP 代码。错误发生在 JavaScript 中。如果可以,请隔离导致错误的文件,然后仅发布该文件。如果您不能这样做,请删除 JavaScript 文件,直到错误消失;最后删除的脚本(可能)导致错误,所以发布。