我读过这篇文章Need helping with innerHTML and array input variables .但是当我这样做时:
if (errors.length > 0) {
var htmlErrors ='';
for (var i = 0; i < errors.length; i++) {
htmlErrors += errors[i];
}
document.getElementById("registration_errors").innerHtml = htmlErrors;
我得到白屏。我的错误在哪里?
最佳答案
尝试:innerHTML
Link
document.getElementById("registration_errors").innerHTML = htmlErrors;
关于javascript - innerHtml 表单数组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26011985/