Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下 for 循环永远不会结束,因为tv_year+1如果我删除了+1它,它可以正常工作。无法弄清楚我在做什么有什么问题。
tv_year+1
+1
counter = tv_year+1 for (var i = fv_year; i < counter; i++) { alert(i) }
错别字...更改fv_year为tv_year
fv_year
tv_year
另外,试试
var counter = parseInt(tv_year,10)+1;