alctel
alctel
关注数: 118
粉丝数: 107
发帖数: 280
关注贴吧数: 44
请教JS 循环显示数据库 示例,我想循环显示数据库中的每个字段 请教JS 循环显示数据库 示例,我想循环显示数据库中的每个字段如何修改? <%@ Language=VBScript codepage=936 %> <% Option Explicit %> <% Dim Conn, rs Set Conn = Server.CreateObject("ADODB.Connection") Set rs = Server.CreateObject("ADODB.Recordset") Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="& Server.MapPath("./") &"\tree.mdb;" rs.open "Select ID, parentId, name, formatte, symbolSize, x, y, category, color, fontSize, method1, ID3, parentId3, source3, target3, name3, des3 From treeview, treeview2 order by ID,ID3", Conn %> <!DOCTYPE html> <html> <head> <title>ECharts 关系图</title> <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0,user-scalable=no,minimum-scale=1.0,maximum-scale=1.0"/> <script src="./echarts.min.js"></script> <script src="./dist/echarts.min.js"></script> <script type="text/javascript" src="dist/echarts.js"></script> </head> <body> <div id="main" style="width: 1000px; height: 800px"></div> <script type="text/javascript"> var myChart = echarts.init(document.getElementById('main')) var categories = [] for (var i = 0; i < 9; i++) { categories[i] = { name: '类目' + i } } option = { // 图的标题 title: { text: '杨氏祖谱 关系图' }, // 提示框的配置 tooltip: { formatter: function (x) { return x.data.des } }, // 工具箱 toolbox: { // 显示工具箱 show: true, feature: { mark: { show: true }, // 还原 restore: { show: true }, // 保存为图片 saveAsImage: { show: true } } }, legend: [ { // selectedMode: 'single', data: categories.map(function (a) { return a.name }) } ], series: [ { type: 'graph', // 类型:关系图 layout: 'force', //图的布局,类型为力导图 symbolSize: 40, // 调整节点的大小 roam: true, // 是否开启鼠标缩放和平移漫游。默认不开启。如果只想要开启缩放或者平移,可以设置成 'scale' 或者 'move'。设置成 true 为都开启 edgeSymbol: ['circle', 'arrow'], edgeSymbolSize: [2, 10], edgeLabel: { normal: { textStyle: { fontSize: 20 } } }, force: { repulsion: 2500, edgeLength: [10, 50] }, draggable: true, lineStyle: { normal: { width: 2, color: '#4b565b' } }, edgeLabel: { normal: { show: true, formatter: function (x) { return x.data.name } } }, label: { normal: { show: true, textStyle: {} } }, <% Do While Not RS.EOF %> // 数据 data: [ { name: "<%=rs("name")%>", tooltip: { formatter: "{b}: <%=rs("formatte")%><br />" }, symbolSize: <%=rs("symbolSize")%>, value: [5, 750], x: <%=rs("x")%>, y: <%=rs("y")%>, fixed: true, // draggable: false, category: <%=rs("category")%>, label: { color: "<%=rs("color")%>", position: 'bottom', fontSize: <%=rs("fontSize")%>, fontWeight: 1000 }, itemStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ offset: 0, color: "#157eff" }, { offset: 1, color: "#35c2ff" } ]) } } }, ] , links: [ { source3: '<%=rs("source3")%>', target3: '<%=rs("target3")%>', name3: '<%=rs("name3")%>', des3: '<%=rs("des3")%>' }, ], <% rs.movenext loop rs.close set rs=nothing %> categories: categories } ] } myChart.setOption(option) </script> </body> </html>
求科普一下,牛胆固醇结石算天然牛黄还是人工牛黄? 求科普一下,牛胆固醇结石算天然牛黄还是人工牛黄?
有谁用过箱中箱蜂王越冬分享一下经验 用起来效果怎么样?有什么存在的问题?
给个意见 南宁市这几天天气变化不大,今天比前几天高一二度,这几天都出太阳,但是前几天有的出来活动,今天所有的蜂王没一个出来活动? 1.相同点这段时间都出太阳? 2.不同的是为什么今天温度高一点点为什么所有蜂王都没有出来活动?
回暖了注意哦 天气回暖,请勿大量了喂食,以免出现大量死亡。
为什么我养不活胡蜂? 已经有足够的水和白糖水,为什么蜂总会死亡呢? 上次说蜂蜜有低毒,我现在都不放蜂蜜了,水也充足的! 谁能说一下详细点的养法?
猴子单挑阿卡丽 今天遇到一个嘴非常贱的阿卡丽 还不能让人说- - 非要什么单挑父子局啊 - - 猴子怎么打阿卡丽 打前求大神指导
1
下一页