/** * Created by chaoxinzeng on 2017/2/20. */ //CSS背景控制 function overColor(Obj) { var elements=Obj.childNodes; for(var i=0;i<elements.length;i++) { elements[i].className="tdbg1" Obj.bgColor=""; } } function outColor(Obj) { var elements=Obj.childNodes; for(var i=0;i<elements.length;i++) { elements[i].className="tdbg"; Obj.bgColor=""; } } function switchCell(n, hash) { nc = document.getElementsByName("navcell"); if (nc) { t = document.getElementsByName("tb") for (i = 0; i < nc.length; i++) { nc.item(i).className = "tab-off"; t.item(i).className = "hide-table"; } nc.item(n - 1).className = "tab-on"; t.item(n - 1).className = "tab-content show-table"; } else if (navcell) { for (i = 0; i < navcell.length; i++) { navcell[i].className = "tab-off"; tb[i].className = "hide-table"; } navcell[n - 1].className = "tab-on"; tb[n - 1].className = "tab-content show-table"; } if (hash) { document.location = "#" + hash; } } function gotoPage(url,idname) { $.get(url,{},function(obj){ if(obj.success) $('#' + idname).html(obj.html); else alert(obj.msg); },'json'); }