加载 JS 时出现Cannot read property ‘appendChild’ of null错误:

将 js 放在body中,避免获取的节点不存在。js引入注意顺序关系