用一组数据绘制曲线图,当点击曲线图上的点时,如何取到该点的数据--急!!! 数据与坐标有转换吧,用event.x和event.y判断点的区域取响应数据吧,等值线可以用MapX等控件来做.还有VRML也可以吧 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 使用VML,实现曲线效果,使用js来生成点击出现相对应的数值的效果。 这最好是用控件来实现 。 。 。 如果要在html里实现的话 , 有些难度 。。或者但鼠标点击某条线时, 你用event.x ,和event.y来获取鼠标的位置 , 然后经过转换 , 转换成对应的在你的图中的坐标 , 然后根据坐标取出你所要的数据 。 。 前提是你在网页中存有此点的数据 。 我知道用vml可以实现绘制曲线图,但就不知道如何再取去一个点的数据值,我不想用控件 用onclick事件,TITLE,等都可以,看下边的例子==========================================<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><!--[if !mso]><style>v\:* { behavior: url(#default#VML) }o\:* { behavior: url(#default#VML) }.shape { behavior: url(#default#VML) }</style><![endif]--><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title></title><style>TD { FONT-SIZE: 9pt}</style></head><body topmargin=5 leftmargin=0 scroll=AUTO><v:line id="_x0000_s1025" alt="" style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="170px,315px" to="255.714285714286px,190px" coordsize="21600,21600" strokecolor="#FF0000" strokeweight="1.5"></v:line><v:rect title="这里放你的值" value="这里放你的值" onclick=alert(this.value) id="_x0000_s1027" style='position:absolute;left:168px;top:313px;width:4px;height:4px; z-index:2' fillcolor="#FF0000" strokecolor="#FF0000"/><v:line id="_x0000_s1025" alt="" style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="255.714285714286px,190px" to="341.428571428571px,227.5px" coordsize="21600,21600" strokecolor="#FF0000" strokeweight="1.5"></v:line><v:rect title="这里放你的值" value="这里放你的值" onclick=alert(this.value) id="_x0000_s1027" style='position:absolute;left:253.714285714286px;top:188px;width:4px;height:4px; z-index:2' fillcolor="#FF0000" strokecolor="#FF0000"/><v:line id="_x0000_s1025" alt="" style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="341.428571428571px,227.5px" to="427.142857142857px,265px" coordsize="21600,21600" strokecolor="#FF0000" strokeweight="1.5"></v:line><v:rect title="这里放你的值" value="这里放你的值" onclick=alert(this.value) id="_x0000_s1027" style='position:absolute;left:339.428571428571px;top:225.5px;width:4px;height:4px; z-index:2' fillcolor="#FF0000" strokecolor="#FF0000"/><v:line id="_x0000_s1025" alt="" style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="427.142857142857px,265px" to="512.857142857143px,187.25px" coordsize="21600,21600" strokecolor="#FF0000" strokeweight="1.5"></v:line><v:rect title="这里放你的值" value="这里放你的值" onclick=alert(this.value) id="_x0000_s1027" style='position:absolute;left:425.142857142857px;top:263px;width:4px;height:4px; z-index:2' fillcolor="#FF0000" strokecolor="#FF0000"/><v:line id="_x0000_s1025" alt="" style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="512.857142857143px,187.25px" to="598.571428571429px,288.375px" coordsize="21600,21600" strokecolor="#FF0000" strokeweight="1.5"></v:line><v:rect title="这里放你的值" value="这里放你的值" onclick=alert(this.value) id="_x0000_s1027" style='position:absolute;left:510.857142857143px;top:185.25px;width:4px;height:4px; z-index:2' fillcolor="#FF0000" strokecolor="#FF0000"/><v:line id="_x0000_s1025" alt="" style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="598.571428571429px,288.375px" to="684.285714285714px,240px" coordsize="21600,21600" strokecolor="#FF0000" strokeweight="1.5"></v:line><v:rect title="这里放你的值" value="这里放你的值" onclick=alert(this.value) id="_x0000_s1027" style='position:absolute;left:596.571428571429px;top:286.375px;width:4px;height:4px; z-index:2' fillcolor="#FF0000" strokecolor="#FF0000"/><v:rect title="这里放你的值" value="这里放你的值" onclick=alert(this.value) id="_x0000_s1027" style='position:absolute;left:682.285714285714px;top:238px;width:4px;height:4px; z-index:2' fillcolor="#FF0000" strokecolor="#FF0000"/></body></html> javaScript不明白 Arg: Fraction out of range (0 to 1 allowed)js报错是啥意思? 请问 $ 代表什么呢。。红色标注的代码段是什么意思呀 cookie问题 http.responseText 乱码 求帮忙看看原因 JS有无构造函数这一说 求一个上拉菜单 如何区别刷新和新开窗口 一个时间的问题 做智能填充 vbscript如何操作cookies啊,不用asp,客户端。
==========================================<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<!--[if !mso]>
<style>
v\:* { behavior: url(#default#VML) }
o\:* { behavior: url(#default#VML) }
.shape { behavior: url(#default#VML) }
</style>
<![endif]--><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style>
TD { FONT-SIZE: 9pt}
</style></head>
<body topmargin=5 leftmargin=0 scroll=AUTO>
<v:line id="_x0000_s1025" alt="" style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="170px,315px" to="255.714285714286px,190px" coordsize="21600,21600" strokecolor="#FF0000" strokeweight="1.5"></v:line>
<v:rect title="这里放你的值" value="这里放你的值" onclick=alert(this.value) id="_x0000_s1027" style='position:absolute;left:168px;top:313px;width:4px;height:4px; z-index:2' fillcolor="#FF0000" strokecolor="#FF0000"/>
<v:line id="_x0000_s1025" alt="" style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="255.714285714286px,190px" to="341.428571428571px,227.5px" coordsize="21600,21600" strokecolor="#FF0000" strokeweight="1.5"></v:line>
<v:rect title="这里放你的值" value="这里放你的值" onclick=alert(this.value) id="_x0000_s1027" style='position:absolute;left:253.714285714286px;top:188px;width:4px;height:4px; z-index:2' fillcolor="#FF0000" strokecolor="#FF0000"/>
<v:line id="_x0000_s1025" alt="" style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="341.428571428571px,227.5px" to="427.142857142857px,265px" coordsize="21600,21600" strokecolor="#FF0000" strokeweight="1.5"></v:line>
<v:rect title="这里放你的值" value="这里放你的值" onclick=alert(this.value) id="_x0000_s1027" style='position:absolute;left:339.428571428571px;top:225.5px;width:4px;height:4px; z-index:2' fillcolor="#FF0000" strokecolor="#FF0000"/>
<v:line id="_x0000_s1025" alt="" style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="427.142857142857px,265px" to="512.857142857143px,187.25px" coordsize="21600,21600" strokecolor="#FF0000" strokeweight="1.5"></v:line>
<v:rect title="这里放你的值" value="这里放你的值" onclick=alert(this.value) id="_x0000_s1027" style='position:absolute;left:425.142857142857px;top:263px;width:4px;height:4px; z-index:2' fillcolor="#FF0000" strokecolor="#FF0000"/>
<v:line id="_x0000_s1025" alt="" style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="512.857142857143px,187.25px" to="598.571428571429px,288.375px" coordsize="21600,21600" strokecolor="#FF0000" strokeweight="1.5"></v:line>
<v:rect title="这里放你的值" value="这里放你的值" onclick=alert(this.value) id="_x0000_s1027" style='position:absolute;left:510.857142857143px;top:185.25px;width:4px;height:4px; z-index:2' fillcolor="#FF0000" strokecolor="#FF0000"/>
<v:line id="_x0000_s1025" alt="" style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="598.571428571429px,288.375px" to="684.285714285714px,240px" coordsize="21600,21600" strokecolor="#FF0000" strokeweight="1.5"></v:line>
<v:rect title="这里放你的值" value="这里放你的值" onclick=alert(this.value) id="_x0000_s1027" style='position:absolute;left:596.571428571429px;top:286.375px;width:4px;height:4px; z-index:2' fillcolor="#FF0000" strokecolor="#FF0000"/>
<v:rect title="这里放你的值" value="这里放你的值" onclick=alert(this.value) id="_x0000_s1027" style='position:absolute;left:682.285714285714px;top:238px;width:4px;height:4px; z-index:2' fillcolor="#FF0000" strokecolor="#FF0000"/>
</body>
</html>