您的位置:首页 > Web前端 > JavaScript

记录一个JS异常Uncaught NotFoundError

2015-06-03 12:26 435 查看
在使用appendChild和insertBefore时,出现

Uncaught NotFoundError : An attempt was made to reference to a Node in a cotext where it does not exist 错误

经测试是因为误认为parent可以是向上n级的parent,而实际上应该是向上第一级的parent才正确。也许是为了提高查找效率,让程序员写得更精确点。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: