日期:2014-05-17 浏览次数:20743 次
for(var i=0;i<8;i++){
var ele_a=document.createElement("a");
ele_a.setAttribute("href","#");
ele_a.setAttribute("onclick"," ");
var ele_li = document.createElement("li");
ele_li.setAttribute("class","li_"+imgSiz)
var div_pic=document.createElement("div");
div_pic.style.background = "url(/textWeb/normal/"+imgSiz+json1[i].iconCls+") 0 0 no-repeat";
div_pic.setAttribute("class","ly_comm_"+imgSiz);
ele_a.appendChild(div_pic);
var div_text=document.createElement("div");
div_text.setAttribute("class","ly_font ly_font_"+imgSiz);
div_text.appendChild(document.createTextNode(json1[i].categoryName));
ele_a.appendChild(div_text);
ele_li.appendChild(ele_a)
eml_ul.appendChild(ele_li);
}
<li class="li_96">
<a href="#">
<div class="ly_pic_0_click ly_comm_96"></div>
<div class="ly_font ly_font_96">设网络</div>
</a>
</li>
div_pic.onclick=function () {
changePic(this);
}
function changePic(e){