前提
必须先引入jq
js
var dbggArray = ['http://img0.imgtn.bdimg.com/it/u=1425782701,3604689765&fm=26&gp=0.jpg', "http://img1.imgtn.bdimg.com/it/u=729506782,1707648579&fm=11&gp=0.jpg", "http://img4.imgtn.bdimg.com/it/u=3203197457,1498846383&fm=11&gp=0.jpg"];
dbggArray = dbggArray[Math.floor((Math.random() * dbggArray.length))]
p = `<a href='http://www.baidu.com'><img class='dbgg' src='${dbggArray}'></img></a>`;
$("body").append(p);
$(".dbgg").css({
position: 'fixed',
bottom: 0,
width: '100%',
height: '100px',
zIndex: 99999
})