这是我的小调试提示。差一点把我的监视器扔出窗外。只查看突出显示的代码。到底在什么情况下才会触发这样的警报?-- http://i.stack.imgur.com/nrf1x.png
这里是完整的,但我不认为它是重要的:http://jsfiddle.net/Timson/QqVrF/8/
if (currLoad > maxload){
alert("I am dumbass, I think that "+currLoad+' is more than '+maxload);
}发布于 2012-12-07 04:49:00
尝试:
if (parseInt(currLoad) > parseInt(maxload)){
alert("I am dumbass, I think that "+currLoad+' is more than '+maxload);
}正如前面的答案所说,您可能是在比较字符串。
https://stackoverflow.com/questions/13752174
复制相似问题