[200分求助]求助孟子、阿信等列位高手~~~js执行CPU100%问题~~!!急~~! 在线~~~~~~~
我改的别人的vml饼图,生成饼图没问题,程序执行也没有错误,可是cpu工作在100%!!!
下面的程序直接粘贴就可以看了,希望大家帮忙!!!!
<SCRIPT LANGUAGE=javascript>
var jsArray=new Array(new Array(),new Array());
jsArray[0][0]='超市1';
jsArray[1][0]='1600';
jsArray[0][1]='超市2';
jsArray[1][1]='9300';
jsArray[0][2]='超市3';
jsArray[1][2]='4700';
jsArray[0][3]='超市4';
jsArray[1][3]='9800';
jsArray[0][4]='超市5';
jsArray[1][4]='2000';
jsArray[0][5]='超市6';
jsArray[1][5]='13400';
jsArray[0][6]='超市7';
jsArray[1][6]='54875';
jsArray[0][7]='超市8';
jsArray[1][7]='3500';
jsArray[0][8]='超市9';
jsArray[1][8]='5600';
jsArray[0][9]='超市10';
jsArray[1][9]='15440';
jsArray[0][10]='超市11';
jsArray[1][10]='3000';
jsArray[0][11]='超市12';
jsArray[1][11]='4200';
jsArray[0][12]='超市13';
jsArray[1][12]='2500';
jsArray[0][13]='超市14';
jsArray[1][13]='13040';
</SCRIPT>
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<html>
<head>
<title>监督点统计数据柱状图</title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link rel="stylesheet" href="/Pub/Css/style.css" type="text/css">
<SCRIPT language=JavaScript>
function deal1(name,value,percent){
divDes.style.display="";
divDes.style.left=window.event.x+15;
divDes.style.top=window.event.y;
var strTemp="<table cellspacing='1' cellpadding='5' width='100%' height='100%' border='0' bgColor='#cecfce'><tr bgColor='#ffffE1'><td>"+name+"</td></tr><tr bgColor='#ffffE1'><td>数据:"+ value +"</td></tr><tr bgColor='#ffffE1'><td>所占比例:"+ percent +"%</td></tr></table>";
divDes.innerHTML=name+"\n数据:"+ value +"\n所占比例:"+ percent+"%";
divDes.innerHTML=strTemp;
}
function deal2()
{
divDes.style.display="none";
}
function VMLPie(pContainer,pWidth,pHeight,pCaption){
this.Container=pContainer;
this.Width= pWidth || 300;
this.Height=pHeight || 203;
this.Caption = pCaption || "关键数据图表";
this.backgroundColor="";
this.Shadow=false;
this.BorderWidth=0;
this.BorderColor=null;
this.all=new Array();
this.RandColor=function(){
return "rgb("+ parseInt( Math.random() * 255) +"," +parseInt( Math.random() * 255) +"," +parseInt( Math.random() * 255)+")";
}
this.VMLObject=null;
}
VMLPie.prototype.Draw=function(numTableRows,numTableCols){
//画外框
var o=document.createElement("v:group");
o.style.width="100%";
o.style.height="90%";
o.coordsize="21600,21600";
o.style.position="relative";
this.VMLObject=o;
this.Container.appendChild(o);
//开始画内部园
var oOval=document.createElement("v:oval");
oOval.id="oOval";
oOval.style.width="55%";
oOval.style.height="90%";
oOval.style.top="5%";
oOval.style.left="2%";
oOval.fillcolor="#d5dbfb";
o.appendChild(oOval);
this.CreatePie(o,numTableRows,numTableCols);
}