var cpkj=function(URL){ var _this=this; this.ele=null; this.url=URL; this.opts=null; this.createEl=function(e,c,p){ var ele=document.createElement(e); ele.setAttribute('class',c); p.appendChild(ele); return ele; }, this.drawTheader=function(ele){ ele.innerHTML='
'+ ''+ '
'+ ''+ '
'+ '
'+ '

期开奖结果

'+ // '

'+ '
'; } this.drawTball=function(ele){ var balls=""; var ballArr=_this.opts.preDrawCode.split(","); for(var i=0;i距下期开奖仅剩:

' } this.drawTbutton=function(ele){ ele.innerHTML='
开奖详情
'+ '
历史开奖
'+ '
走势
'+ '
图库
' } this.getAjax=function(callback){ $.ajax({ url:_this.url, type:"get", success:function(res){ // var data=eval('(' + res + ')'); var data=JSON.parse(res); // console.log(data); _this.opts=data.result.data; // console.log('countdown',formatTime(_this.opts.drawTime)); if(callback){ callback(); } } }) } this.getData=function(){ //header数据 _this.addData("lotName",0,_this.opts.lotName); _this.addData("qishu",0,_this.opts.preDrawIssue); // _this.addData("kjrq",0,"每周二、周四、周日开奖"); //小球数据 var ballArr=_this.opts.preDrawCode.split(","); for(var i=0;i