如何用JavaScript画一条直线??? 直线???用表格、<hr>不都可以吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://expert.csdn.net/Expert/TopicView1.asp?id=1553617 那就只能用vml或者DA控件了。 只能调用外部控件,js语言不能绘图<html><head><meta content="text/html; charset=gb2312" http-equiv="Content-Type"><meta content="Microsoft FrontPage 4.0" name="GENERATOR"><meta name="ProgId" content="FrontPage.Editor.Document"><title>随便画,看看效果</title></head><body><object classid="CLSID:0002E500-0000-0000-C000-000000000046" height="100%"id="ChartSpace1" width="100%"></object><script language=VBScript>dim serdim xpt()dim ypt()dim curptdim maxdim width, heightSub Window_OnLoad()window.status = "Click to set a point; double-click to end the shape."width = chartspace1.offsetwidthheight = chartspace1.offsetheightcurpt = 0max = 50redim xpt(max)redim ypt(max)set ch = chartspace1.charts.addch.type = chartspace1.constants.chChartTypeScatterLineFilledch.axes(0).scaling.hasautomaximum = falsech.axes(0).scaling.hasautominimum = falsech.axes(1).scaling.hasautomaximum = falsech.axes(1).scaling.hasautominimum = falsech.axes(0).scaling.minimum = 0ch.axes(1).scaling.minimum = 0ch.axes(0).scaling.maximum = 10000ch.axes(1).scaling.maximum = 10000ch.axes(0).scaling.orientation = 1ch.axes.delete(0)ch.axes.delete(0)set ser = ch.seriescollection.addser.datalabelscollection.addEnd SubSub Window_onResize()width = chartspace1.offsetwidthheight = chartspace1.offsetheightEnd SubSub ChartSpace1_MouseMove(e)xpt(curpt) = CInt(e.X*10000/width)ypt(curpt) = CInt(e.Y*10000/height)ser.setdata 4, -1, xptser.setdata 3, -1, yptchartspace1.refreshEnd SubSub chartspace1_click(e)xpt(curpt) = CInt(e.X*10000/width)ypt(curpt) = CInt(e.Y*10000/height)ser.setdata 4, -1, xptser.setdata 3, -1, yptcurpt = curpt+1if curpt > max thencall newseriesend ifEnd SubSub chartspace1_dblclick(e)xpt(curpt) = nullypt(curpt) = nullser.setdata 4, -1, xptser.setdata 3, -1, yptcall newseriesEnd SubSub newseriesser.datalabelscollection.delete(0)set ser = ser.parent.seriescollection.addser.datalabelscollection.addfor i = 0 to maxxpt(i) = nullypt(i) = nullnextcurpt = 0End Sub</script></body></html> 呵呵,我偏偏就要用js语言绘图,还要跨浏览器的画你信不信?http://expert.csdn.net/Expert/TopicView1.asp?id=1238516 新浪微博相册Ticket转换成pid的算法 怎样通过文本链接实现上传功能 Firefox fileupload绝对路径 关于js的继承问题 iframe怎样设置为透明 ?截取字符串问题?正则表达式能不能完成?分不够在加… new activexObject Table增加行問題,求救---求源碼 一个说简单不简单,说复杂又不复杂的问题! 请教各位前辈,如何在javascript中调用Word?谢谢!(在线等待中) js中如何比较日期大小? 关于编辑器的控件问题(分数可以另加)
<head>
<meta content="text/html; charset=gb2312" http-equiv="Content-Type">
<meta content="Microsoft FrontPage 4.0" name="GENERATOR">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>随便画,看看效果</title>
</head><body><object classid="CLSID:0002E500-0000-0000-C000-000000000046" height="100%"
id="ChartSpace1" width="100%">
</object>
<script language=VBScript>dim serdim xpt()
dim ypt()
dim curptdim maxdim width, heightSub Window_OnLoad()
window.status = "Click to set a point; double-click to end the shape."width = chartspace1.offsetwidth
height = chartspace1.offsetheightcurpt = 0
max = 50redim xpt(max)
redim ypt(max)set ch = chartspace1.charts.add
ch.type = chartspace1.constants.chChartTypeScatterLineFilledch.axes(0).scaling.hasautomaximum = false
ch.axes(0).scaling.hasautominimum = false
ch.axes(1).scaling.hasautomaximum = false
ch.axes(1).scaling.hasautominimum = falsech.axes(0).scaling.minimum = 0
ch.axes(1).scaling.minimum = 0
ch.axes(0).scaling.maximum = 10000
ch.axes(1).scaling.maximum = 10000ch.axes(0).scaling.orientation = 1ch.axes.delete(0)
ch.axes.delete(0)set ser = ch.seriescollection.add
ser.datalabelscollection.add
End Sub
Sub Window_onResize()
width = chartspace1.offsetwidth
height = chartspace1.offsetheight
End Sub
Sub ChartSpace1_MouseMove(e)
xpt(curpt) = CInt(e.X*10000/width)
ypt(curpt) = CInt(e.Y*10000/height)ser.setdata 4, -1, xpt
ser.setdata 3, -1, yptchartspace1.refresh
End Sub
Sub chartspace1_click(e)
xpt(curpt) = CInt(e.X*10000/width)
ypt(curpt) = CInt(e.Y*10000/height)
ser.setdata 4, -1, xpt
ser.setdata 3, -1, yptcurpt = curpt+1if curpt > max then
call newseries
end ifEnd Sub
Sub chartspace1_dblclick(e)
xpt(curpt) = null
ypt(curpt) = null
ser.setdata 4, -1, xpt
ser.setdata 3, -1, yptcall newseriesEnd Sub
Sub newseries
ser.datalabelscollection.delete(0)set ser = ser.parent.seriescollection.add
ser.datalabelscollection.addfor i = 0 to max
xpt(i) = null
ypt(i) = null
nextcurpt = 0
End Sub</script></body></html>