<%@ page language="java" contentType="text/html; charset=utf-8"? ? pageEncoding="utf-8" import="java.util.*"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>echarts</title><script src="echarts.min.js"></script></head><body><% int z=4; int y=3; int x=5; int w=5; int v=5; int u=5;%><div id="main" style="width:600px;height:600px;"></div><script type="text/javascript">var a=z.value;var b=y.value;var c=x.value;var d=w.value;var e=u.value;var f=v.value;var myChart=echarts.init(document.getElementById('main'));?var option = { ? ?title: { ? ? ? ?text: '學生技能展示系統' ? ?}, ? ?tooltip: {}, ? ?legend: { ? ? ? ?data: ['學生'] ? ?}, ? ?radar: { ? ? ? ?// shape: 'circle', ? ? ? ?indicator: [ ? ? ? ? ? { name: '數理水平', max: 6}, ? ? ? ? ? { name: '專業技巧', max: 6}, ? ? ? ? ? { name: '動手能力', max: 6}, ? ? ? ? ? { name: '英語水平', max: 6}, ? ? ? ? ? { name: '文化素質', max: 6}, ? ? ? ? ? { name: '身體素質', max: 6} ? ? ? ?] ? ?}, ? ?series: [{ ? ? ? ?type: 'radar', ? ? ? ?// areaStyle: {normal: {}}, ? ? ? ?data : [ ? ? ? ? ? ? { ? ? ? ? ? ? ? ?value : [a,b,c,d,e,f], ? ? ? ? ? ? ? ? label: { ? ? ? ? ? ? ? ? ? ? ? ?normal: { ? ? ? ? ? ? ? ? ? ? ? ? ? ?show: true, ? ? ? ? ? ? ? ? ? ? ? ? ? ?formatter:function(params) { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?return params.value; ? ? ? ? ? ? ? ? ? ? ? ? ? ?} ? ? ? ? ? ? ? ? ? ? ? ?} ? ? ? ? ? ? ? ? ? ?} ? ? ? ? ? ?} ? ? ? ?] ? ?}] };?myChart.setOption(option);</script></body></html>為什么不能把上面a,b,c,d,e,f的值傳入下面的script里面去啊,怎么才能把這些值傳進去啊??
急急急?。。【W頁中的變量
qq_莫非
2017-05-07 15:26:39