2015 Note: Everyone should go look through their old questions and be encouraged by how far they've come. There are so many things wrong with this code – it's wonderful.Javascript錯誤(IE):對象不支持此屬性或方法
此代碼在Firefox中完美工作,在IE中以'negative'結尾);休息。我不知道如何解決它! Argghhh!
$(".topline strong").digits().each(function() {
s = $(this),
c = "change";
if ($(s).hasClass(c) & $(s).text().replace(/%/gi, "") > 0) {
$(s).addClass("positive");
}
if ($(s).hasClass(c) & $(s).text().trim().charAt(0) == "-") $(s).addClass("negative");
});
您可以分開語句以查看哪個導致錯誤? – 2010-08-11 10:53:27