impressionHtml=`<img src=${value} alt=""/>`; document.getElementById("wrapper").appendChild(impressionHtml); js向父元素wrapper中的末尾添加 定义好的html,报错: Uncaught TypeError: Failed to execute is not of type 'Node'. 在stackoverflow上找到很好的一个解释:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <ti
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title&