浏览器说加粗的这一行有错误,哪错了?
window.onload=function(){
waterfall('main','box');
var dataInt={"data":[{"src":'0.jpg'},{"src":'1.jpg'},{"src":'2.jpg'},{"src":'3.jpg'}]};
window.onscroll=function(){
if(checkScrollSlide){
var oParent=document.getElementById('main');
for(var i=0;i<dataInt.data.length;i++){
var oBox=document.createElement('div');
oBox.className='box';
oParent.appendChild(oBox);
oPic.className='pic';
oBox.appendChild(oPic);
var oImg=document.createElement('img');
oImg.src="images/"+dateInt.date[i].src;
oPic.appendChild(oImg);
}
waterfall('main','box');
}
}
}
浏览器提示
Uncaught ReferenceError: oPic is not defined