我有这样的代码:
var exist_file = document.getElementById('exist_file').value;
document.getElementById('dialog-confirm-upload').innerHTML=
"The file" +
for (var i=0;i<exist_file.length;i++){
exist_file + ","
}
+
"has been already transferred? Do you want to overwrite?"
exists_file 是一个包含一个或多个元素的数组:['hello', 'ok']。我想将值传递给innerHTML
这样的。
"The file hello, ok has been already transferred? Do you want to overwrite?"
我尝试了以下上面的代码,但事实证明这不是有效的语法。我怎样才能做到这一点?