input focus 如何设置为变量?

发布于 9 年前作者 npeng4029 次浏览最后编辑 9 年前来自 issues

功能是点击提交先遍历input查看是否有空值,有的话提示用户然后将第一个空值的input聚焦

问题是我的input是循环出来的,focus如何像 name一样设置为变量

1 回复
guiying71
guiying711 楼6 年前

增加一个itemName.focus