js 将一段html插入到body最前面

var wrap=document.createElement("div");
var first=document.body.firstChild;//得到页面的第一个元素
var wraphtml=document.body.insertBefore(wrap,first);

原文地址:https://www.cnblogs.com/CyLee/p/5911887.html