好像是去调用Google 某个API。
解决方案 »
- 横向二级下拉菜单,怎么实现相对于父元素居中显示?
- js+iframe实现跨域时的问题
- 用户点击下载,弹出另存为的框,选择自己的本地的路径,保存图片,在IE6上可以正常运行的,但是在firefox测试的时候出现 savepic is not defined ? 不知道如何解决,请求高手帮
- 我想做类似google的文本框,输入第一(多)个字母,以该字母开头的条目就列出来
- 求拖动层的源代码(要求像livespace qq空间里那样的)
- js给embed 的flashvars 属性赋值 FireFox下失败?
- js线递归问题
- 日本日期的和历西历互相转换
- 一段代码,谁帮我调一下,谢谢
- asp.net程序员急需以下两段javascript代码:一是实现10秒后页面自动跳转,而是实现10秒钟后页面自动关闭!
- js读取xml,并且将数据填充到select中,在ff下不行,在ie中可以,在ff中不报任何错误,用firebug下断点调试又可以运行还正确。高手帮帮忙
- alert(whichIt)和alert(whichIt.parentElement)结果怎么一样呢?怎么回事
括号中的结构是: ('一段代码', 62, 75, '一段以|号隔开的关键字'.split('|'), 0, {})这样独立的个括号,不知道起了什么作用
function Chart(E,D,A,C,B){
this.parent=document.getElementById(E);
this.xl=D;
this.yl=A;
this.barw=(document.all)?C:(C-2);
this.chartw=0;
this.charth=B+((document.all)?0:-2);
this.minpv=this.yl[0];
this.maxpv=this.yl[this.yl.length-1]
}
Chart.prototype.GetPVHeight=function(B){
var A=Math.round(((B-this.minpv)*this.charth/(this.maxpv-this.minpv)))+((document.all)?2:0);
if(A>this.charth){
A=this.charth
}
return A
};Chart.prototype.Create=function(fname, ename){
var A=document.createElement("div");
A.className="chart";
A.style.height=this.charth+"px";
this.parent.appendChild(A);
var K=document.createElement("div");
A.appendChild(K);
K.className="hit";
var J=0;
for(var G=0;G<this.xl.length;G+=2){
var B=this.GetPVHeight(this.xl[G]);
var I=this.xl[G+1];
var F=document.createElement("div");
A.appendChild(F);
F.className="bar";
F.style.width=this.barw+"px";
F.style.height=B+"px";
F.style.top=this.charth-B-1+"px";
F.style.left=(J-1)+"px";
F.innerHTML=" ";
F.ohit=K;
F.onmouseover=function(){
this.className="barhl";
this.ohit.style.display="";
this.ohit.innerHTML=this.id.substring(3,this.id.length);
this.ohit.style.left=this.style.left;
this.ohit.style.top=parseInt(this.style.top)-parseInt(this.ohit.offsetHeight)+"px"
};
F.onmouseout=function(){
this.className="bar";
this.ohit.style.display="none"
};
var E=document.createElement("div");
A.appendChild(E);
E.style.width=this.barw+"px";
E.style.top=(document.all)?this.charth:this.charth+3+"px";
var C=I.indexOf(".");
F.id="bar"+I.substring(0,C) + fname + I.substring(C+1,I.length)+ ename + " " + this.xl[G];
if(G%4==0){
if((I.substring(C+1,I.length)=="1"||I.substring(C+1,I.length)=="2")){
E.className="titxhl";
E.style.left=(J-4)+"px";
E.innerHTML=I
}else{
E.className="titx";
E.style.left=(J-1)+"px";
E.innerHTML=I.substring(C+1,I.length)
}
}else{
E.className="titx";
E.style.left=(J-1)+"px";
E.innerHTML=""
}
J+=this.barw+((document.all)?-1:1)
}
this.chartw=J+((document.all)?1:-1);
A.style.width=this.chartw+"px";
for(var G=0;G<this.yl.length;G++){
var D=this.GetPVHeight(this.yl[G]);
if(G!=0&&G!=this.yl.length-1){
var H=document.createElement("div");
A.appendChild(H);
H.className="liney";
H.style.width=(this.chartw-((document.all)?1:-1))+"px";
H.style.top=(this.charth-D-1)+"px"
}
var E=document.createElement("div");
A.appendChild(E);
E.className="tity";
E.style.width="35px";
E.style.top=(this.charth-D-2)+"px";
E.style.left=-42+"px";
E.innerHTML=this.yl[G]
}
};
谢谢大家!