Cannot read property 'innerHTML' of null
这里哪里错了
var g_tpl=function(id){
return g('tpl_'+id).innerHTML;
}
这里哪里错了
var g_tpl=function(id){
return g('tpl_'+id).innerHTML;
}
2015-11-07
var odiv=document.getElementById('text_father');
for(var i=0;i<text_one.length;i++){
odiv.innerHTML=odiv.innerHTML+'<div class="text_first_div_change_one col-xs-12 col-sm-12 col-md-12"style="padding: 0">'
+'<div class="info_img col-xs-2 col-sm-offset-2 col-md-2">'+' <img src="../images/tou1.png" alt="">'+
'</div>'+'<div class="info_detail_one col-xs-8 col-sm-8 col-md-8"style="padding: 0;">'+
'<div class="transpan col-xs-1 col-sm-1 col-md-1"></div>'+'<div class="text_detail col-xs-11 col-sm-11 col-md-11">' +text_one[i].text_one+
'</div>'+' </div>'+'</div>'+' <div class="text_first_div_change_two col-xs-12 col-sm-12 col-md-12">'+
' <div class="info_detail_two col-xs-10 col-sm-10 col-md-10"style="padding: 0">'+
'<div class="text_detail_two col-xs-11 col-sm-11 col-md-11">'+text_one[i].text_two+
' </div>'+'<div class="transpan_1 col-xs-1 col-sm-1 col-md-1"></div>'+' </div>'+'<div class="info_img_two col-xs-2 col-sm-2 col-md-2">'+
' <img src="../images/tou7.png" alt="">'+'</div>'+'</div>';
}
Pictrue_carousel_1.js:25 Uncaught TypeError: Cannot read property 'innerHTML' of null
是一个json数组的引用,这是哪里错了,为啥输不出来结果
举报