【发布时间】:2018-03-21 09:47:35
【问题描述】:
我目前正在使用 nodejs 和 html 处理我的基于 Web 的系统。
有没有其他方法可以在不使用 forEach 的情况下循环 html 元素?
我是这样想的(这只是一个例子):
<% for(var ctr=0; ctr<arrayname.length;ctr++){ %>`
`<input type="text">`
`<%}%>`
我希望有人能回答我的问题。 :)
【问题讨论】:
-
你试过使用jstl标签吗?
-
使用foreach有什么问题
-
可以使用 for 循环,速度更快。
-
@chiliNUT 出于某些目的需要“ctr”变量及其值。
标签: javascript html node.js express htmlelements