Arrays 如何在新行中显示数组元素?

Arrays 如何在新行中显示数组元素?,arrays,Arrays,我试图以新行显示数组元素,它都显示在同一行中。我试过一些相关的答案,但没有成功。我的代码如下: //Line $("#display_File_most").text(counter.join(" ", "<br/>")); //行 $(“#显示#文件_most”).text(counter.join(“,””); 感谢您的时间:)他们将此行从$(“#display_File_most”).text(counter.join(“,””)改为$)到$(“

我试图以新行显示数组元素,它都显示在同一行中。我试过一些相关的答案,但没有成功。我的代码如下:

 //Line 
            $("#display_File_most").text(counter.join(" ", "<br/>"));
//行
$(“#显示#文件_most”).text(counter.join(“,”
”);

感谢您的时间:)

他们将此行从
$(“#display_File_most”).text(counter.join(“,”
”)改为
$)
$(“#display_File_most”).html(counter.join(“
”)
会起作用。

.text
更改为
.html
。谢谢,还是一样的:您正在做的是
计数器。第二个参数

,join(“”
)是不需要的,因此被忽略。为什么要在那里添加