gpt4 book ai didi

javascript - innerHtml 表单数组

转载 作者:行者123 更新时间:2023-11-30 10:12:00 24 4
gpt4 key购买 nike

我读过这篇文章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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com