分享
 
 
 

定制你自己的图形报表 (3)

王朝java/jsp·作者佚名  2006-01-08
窄屏简体版  字體: |||超大  

下面给出jsp的页面:

下面给出的是它的jsp文件:

<%@ page language="java" contentType="text/html; charset=gb2312"%>

<%@ page import="java.sql.* "%>

<%@ page import="java.text.* "%>

<%@ page import="java.sql.Date "%>

<%@ page import="java.util.* "%>

<%!

private String toCh(String source) {

if ((source == null) || source.equals(""))

return null;

try {

System.out.println(new String(source.getBytes("ISO8859-1")));

return new String(source.getBytes("ISO8859-1"));

} catch (java.io.UnsupportedEncodingException e) {

return source;

}

}

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>draw page</title>

<meta http-equiv="pragma" content="no-cache">

<meta http-equiv="cache-control" content="no-cache">

<meta http-equiv="expires" content="0">

<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

<meta http-equiv="description" content="This is my page">

<!--

<link rel="stylesheet" type="text/css" href="styles.css">

-->

</head>

<style>

.editTd

{

height:20;

font-size:12px;

font-family:verdana;

}

</style>

<SCRIPT LANGUAGE="JavaScript">

<!--

function closeWin() {

window.close();

}

// -->

</SCRIPT>

<SCRIPT LANGUAGE="JavaScript">

function verify()

{

var ctr=0;

var title1=form.title.value;

var unit1=form.unit.value;

var font_style1=form.font_style.selectedIndex;

var heading_fontsize1=form.heading_fontsize.selectedIndex;

var table_fontsize1=form.table_fontsize.selectedIndex;

var font_mode1=form.font_mode.selectedIndex;

var color_mode1=form.color_mode.selectedIndex;

var bg_color1=form.bg_color.selectedIndex;

var chart_style1=form.chart_style.selectedIndex;

var cutline_mode1=form.cutline_mode.selectedIndex;

var view_position1=form.view_position.selectedIndex;

var y_axis_proportion1=form.y_axis_proportion.selectedIndex;

var y_axis_not1=form.y_axis_not.selectedIndex;

var word_direction1=form.word_direction.selectedIndex;

var axis_color1=form.axis_color.selectedIndex;

var gridding1=form.gridding.selectedIndex;

var gridding_color1=form.gridding_color.selectedIndex;

if((title1.length==0)||(unit1.length==0)||

(font_style1=="0")||(heading_fontsize1=="0")||

(table_fontsize1=="0")||(font_mode1=="0")||

(view_position1=="0")||(cutline_mode1=="0")

)

{

alert("请填写必要信息!");

ctr=1;

}

if((chart_style1=="2")&&(color_mode1!="1")||(chart_style1=="5")&&(color_mode1!="1"))

{

alert("是折线图,分布图就要选纯色!");

ctr=1;

}

if((gridding_color1!="0")&&(gridding1=="0")||(gridding_color1!="0")&&(gridding1=="1"))

{

alert("选网格线颜色了,为什么不选网格线!");

ctr=1;

}

if((chart_style1=="5")&&(bg_color1=="orange"))

{

alert("分布图的颜色为orange!");

ctr=1;

}

if((chart_style1==1)&&(bg_color1!=0)||(chart_style1==1)&&(color_mode1!=2))

{

alert("饼图没有背景色,颜色设置当然为彩色!");

ctr=1;

}

if(ctr!=1)

{

form.submit();

}

}

</SCRIPT>

<BODY BGCOLOR="#FFFFFf">

<br><br>

<form name="form" method="get" action="test.jsp">

<table align="center" width="650" height="500">

<tr><td align="center" class="editTd" colspan="7">显示页面</td></tr>

<tr><td bgcolor="#FFFFF9" height="20" colspan="7"></td></tr>

<tr><td bgcolor="#00000f" height="1" colspan="7"></td></tr>

<tr><td bgcolor="#FFFFF9" height="20" colspan="7"></td></tr>

<tr><td align="center" valign="middle">

<applet

code=draw.class

codebase="C:\Tomcat 5.0\webapps\draw1224\WEB-INF\classes"

width="700"

height="450"

align="center"

alt="请稍等,正在载入applet..."

hspace="1"

vspace="1"

>

<!--the row name of the table-->

<param name=datax1 value=<%=request.getParameter("x1")%>>

<param name=datax2 value=<%=request.getParameter("x2")%>>

<param name=datax3 value=<%=request.getParameter("x3")%>>

<param name=datax4 value=<%=request.getParameter("x4")%>>

<param name=datax5 value=<%=request.getParameter("x5")%>>

<param name=datax6 value=<%=request.getParameter("x6")%>>

<param name=datax7 value=<%=request.getParameter("x7")%>>

<param name=datax8 value=<%=request.getParameter("x8")%>>

<param name=datax9 value=<%=request.getParameter("x9")%>>

<param name=datax10 value=<%=request.getParameter("x10")%>>

<param name=datax11 value=<%=request.getParameter("x11")%>>

<param name=datax12 value=<%=request.getParameter("x12")%>>

<!--the each value of the row-->

<param name=datay1 value=<%=request.getParameter("y1")%>>

<param name=datay2 value=<%=request.getParameter("y2")%>>

<param name=datay3 value=<%=request.getParameter("y3")%>>

<param name=datay4 value=<%=request.getParameter("y4")%>>

<param name=datay5 value=<%=request.getParameter("y5")%>>

<param name=datay6 value=<%=request.getParameter("y6")%>>

<param name=datay7 value=<%=request.getParameter("y7")%>>

<param name=datay8 value=<%=request.getParameter("y8")%>>

<param name=datay9 value=<%=request.getParameter("y9")%>>

<param name=datay10 value=<%=request.getParameter("y10")%>>

<param name=datay11 value=<%=request.getParameter("y11")%>>

<param name=datay12 value=<%=request.getParameter("y12")%>>

<!--the parameter of the submitted-->

<param name=Title value=<%=request.getParameter("title")%>>

<!-- <param name=Unit value=<%=toCh(request.getParameter("unit"))%>> -->

<param name=Unit value=<%=request.getParameter("unit")%>>

<param name=Font_Style value=<%=request.getParameter("font_style")%>>

<param name=Heading_Fontsize value=<%=request.getParameter("heading_fontsize")%>>

<param name=Table_Fontsize value=<%=request.getParameter("table_fontsize")%>>

<param name=Font_Mode value=<%=request.getParameter("font_mode")%>>

<param name=Color_Mode value=<%=request.getParameter("color_mode")%>>

<param name=Bg_Color value=<%=request.getParameter("bg_color")%>>

<param name=Chart_Style value=<%=request.getParameter("chart_style")%>>

<param name=Cutline_Mode value=<%=request.getParameter("cutline_mode")%>>

<param name=View_Position value=<%=request.getParameter("view_position")%>>

<param name=View_Proportion value=<%=request.getParameter("view_proportion")%>>

<param name=Y_axis_Proportion value=<%=request.getParameter("y_axis_proportion")%>>

<param name=Y_axis_Not value=<%=request.getParameter("y_axis_not")%>>

<param name=Word_Direction value=<%=request.getParameter("word_direction")%>>

<param name=Axis_Color value=<%=request.getParameter("axis_color")%>>

<param name=Gridding value=<%=request.getParameter("gridding")%>>

<param name=Gridding_Color value=<%=request.getParameter("gridding_color")%>>

</applet>

</td></tr>

<tr><td bgcolor="#FFFFF9" height="20" colspan="7"></td></tr>

<tr><td bgcolor="#00000f" height="1" colspan="7"></td></tr>

<tr><td bgcolor="#FFFFF9" height="20" colspan="7"></td></tr>

</table>

<table align="center" width="650" >

<tr><td bgcolor="#FFFFF9" height="20" colspan="7"></td></tr>

<tr><td bgcolor="#00000f" height="1" colspan="7"></td></tr>

<tr><td bgcolor="#FFFFF9" height="20" colspan="7"></td></tr>

<tr><td bgcolor="#00000f" height="1" colspan="7"></td></tr>

<tr>

<td class="editTd" >&nbsp;&nbsp;图表标题:</td>

<td class="editTd" colspan="3"><input type="text" name="title" size="29" ></td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;&nbsp;文字字体:</td>

<td class="editTd" ><select size="1" name="font_style" style="width:120px">

<option value="0" selected>请选择...</option>

<option value="verdana" >verdana</option>

<option value="Impact" >Impact</option>

<option value="Arial Black" >Arial Black</option>

<option value="Tahoma" >Tahoma</option>

<option value="Garamond" >Garamond</option>

</select></td>

</tr>

<tr>

<td class="editTd" width="15%">&nbsp;&nbsp;名称1:</td>

<td class="editTd" width="18%"><input type="text" name="x1" size="12"></td>

<td class="editTd" width="8%">值1:</td>

<td class="editTd" width="12%"><input type="text" name="y1" size="5"></td>

<td class="editTd" width="4%">&nbsp;</td>

<td class="editTd" width="22%">&nbsp;&nbsp;标题字体大小:</td>

<td class="editTd" ><select size="1" name="heading_fontsize" style="width:120px">

<option value="0" selected>请选择...</option>

<option value="18" >18</option>

<option value="20" >20</option>

<option value="22" >22</option>

<option value="24" >24</option>

<option value="26" >26</option>

<option value="28" >28</option>

<option value="32" >32</option>

<option value="36" >36</option>

</select></td>

</tr>

<tr>

<td class="editTd" >&nbsp;&nbsp;名称2:</td>

<td class="editTd" ><input type="text" name="x2" size="12"></td>

<td class="editTd" >值2:</td>

<td class="editTd" ><input type="text" name="y2" size="5"></td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;&nbsp;表体字体大小:</td>

<td class="editTd" ><select size="1" name="table_fontsize" style="width:120px">

<option value="0" selected>请选择...</option>

<option value="8" >8</option>

<option value="9" >9</option>

<option value="10" >10</option>

<option value="11" >11</option>

<option value="12" >12</option>

<option value="13" >13</option>

<option value="14" >14</option>

<option value="15" >15</option>

</select></td>

</tr>

<tr>

<td class="editTd" >&nbsp;&nbsp;名称3:</td>

<td class="editTd" ><input type="text" name="x3" size="12"></td>

<td class="editTd" >值3:</td>

<td class="editTd" ><input type="text" name="y3" size="5"></td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;&nbsp;字体样式:</td>

<td class="editTd" ><select size="1" name="font_mode" style="width:120px">

<option value="0" selected>请选择...</option>

<option value="PLAIN" >正常</option>

<option value="ITALIC " >斜体</option>

<option value="BOLD" >粗体</option>

</select></td>

</tr>

<tr>

<td class="editTd" >&nbsp;&nbsp;名称4:</td>

<td class="editTd" ><input type="text" name="x4" size="12"></td>

<td class="editTd" >值4:</td>

<td class="editTd" ><input type="text" name="y4" size="5"></td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;&nbsp;颜色设置:</td>

<td class="editTd" ><select size="1" name="color_mode" style="width:120px">

<option value="0" selected>请选择...</option>

<option value="1" >纯色</option>

<option value="2" >彩色</option>

</select></td>

</tr>

<tr>

<td class="editTd" >&nbsp;&nbsp;名称5:</td>

<td class="editTd" ><input type="text" name="x5" size="12"></td>

<td class="editTd" >值5:</td>

<td class="editTd" ><input type="text" name="y5" size="5"></td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;&nbsp;背景色显示:</td>

<td class="editTd" ><select size="1" name="bg_color" style="width:120px">

<option value="0" selected>请选择...</option>

<option value="blue">blue</option>

<option value="cyan">cyan</option>

<option value="gray">gray</option>

<option value="green">green</option>

<option value="lightGray">light gray</option>

<option value="magenta">magenta</option>

<option value="orange">orange</option>

<option value="pink">pink</option>

<option value="red">red</option>

<option value="white">white</option>

<option value="yellow">yellow</option>

</select></td>

</tr>

<tr>

<td class="editTd" >&nbsp;&nbsp;名称6:</td>

<td class="editTd" ><input type="text" name="x6" size="12"></td>

<td class="editTd" >值6:</td>

<td class="editTd" ><input type="text" name="y6" size="5"></td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;&nbsp;图表显示方式:</td>

<td class="editTd" ><select size="1" name="chart_style" style="width:120px">

<option value="0" selected>请选择...</option>

<option value="1" >饼图</option>

<option value="2" >折线图</option>

<option value="3" >直方图</option>

<option value="4" >柱状图</option>

<option value="5" >分布图</option>

</select></td>

</tr>

<tr>

<td class="editTd" >&nbsp;&nbsp;名称7:</td>

<td class="editTd" ><input type="text" name="x7" size="12"></td>

<td class="editTd" >值7:</td>

<td class="editTd" ><input type="text" name="y7" size="5"></td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;&nbsp;图例显示方式:</td>

<td class="editTd" ><select size="1" name="cutline_mode" style="width:120px">

<option value="0" selected>请选择...</option>

<option value="1">文字</option>

<option value="2">百分比</option>

<option value="3">文字和百分比</option>

</select></td>

</tr>

<tr>

<td class="editTd" >&nbsp;&nbsp;名称8:</td>

<td class="editTd" ><input type="text" name="x8" size="12"></td>

<td class="editTd" >值8:</td>

<td class="editTd" ><input type="text" name="y8" size="5"></td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;&nbsp;图例显示位置:</td>

<td class="editTd" ><select size="1" name="view_position" style="width:120px">

<option value="0" selected>请选择...</option>

<option value="1">靠右</option>

<option value="2">靠下</option>

<option value="3">其上1</option>

<option value="4">其上2</option>

</select></td>

</tr>

<tr>

<td class="editTd" >&nbsp;&nbsp;名称9:</td>

<td class="editTd" ><input type="text" name="x9" size="12"></td>

<td class="editTd" >值9:</td>

<td class="editTd" ><input type="text" name="y9" size="5"></td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;&nbsp;显示比例:</td>

<td class="editTd" ><select size="1" name="view_proportion" style="width:120px">

<option value="0" selected>请选择...</option>

<option value="1" >550*300</option>

<option value="2" >600*350</option>

<option value="3" >650*400</option>

<option value="4" >700*450</option>

</select></td>

</tr>

<tr>

<td class="editTd" >&nbsp;&nbsp;名称10:</td>

<td class="editTd" ><input type="text" name="x10" size="12"></td>

<td class="editTd" >值10:</td>

<td class="editTd" ><input type="text" name="y10" size="5"></td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;&nbsp;纵坐标设置:</td>

<td class="editTd" ><select size="1" name="y_axis_proportion" style="width:120px">

<option value="0" selected>请选择...</option>

<option value="2">100*1</option>

<option value="3">100*10</option>

<option value="4">100*100</option>

<option value="5">100*100*10</option>

<option value="6">100*100*100</option>

</select></td>

</tr>

<tr>

<td class="editTd" >&nbsp;&nbsp;名称11:</td>

<td class="editTd" ><input type="text" name="x11" size="12"></td>

<td class="editTd" >值11:</td>

<td class="editTd" ><input type="text" name="y11" size="5"></td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;&nbsp;是否显示纵坐标:</td>

<td class="editTd" ><select size="1" name="y_axis_not" style="width:120px">

<option value="0" selected>请选择...</option>

<option value="1" >是</option>

<option value="2" >否</option>

</select></td>

</tr>

<tr>

<td class="editTd" >&nbsp;&nbsp;名称12:</td>

<td class="editTd" ><input type="text" name="x12" size="12"></td>

<td class="editTd" >值12:</td>

<td class="editTd" ><input type="text" name="y12" size="5"></td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;&nbsp;横坐标轴文字方向:</td>

<td class="editTd" ><select size="1" name="word_direction" style="width:120px">

<option value="0" selected>请选择...</option>

<option value="1">普通</option>

<option value="2">上下错开</option>

</select></td>

</tr>

<tr>

<td class="editTd" >&nbsp;&nbsp;单位:</td>

<td class="editTd" colspan="3"><input type="text" name="unit" size="12"></td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;&nbsp;坐标轴颜色:</td>

<td class="editTd" ><select size="1" name="axis_color" style="width:120px">

<option value="0" selected>请选择...</option>

<option value="blue">blue</option>

<option value="black">black</option>

<option value="cyan">cyan</option>

<option value="gray">gray</option>

<option value="green">green</option>

<option value="light gray">light gray</option>

<option value="magenta">magenta</option>

<option value="orange">orange</option>

<option value="pink">pink</option>

<option value="red">red</option>

<option value="white">white</option>

<option value="yellow">yellow</option>

</select></td>

</tr>

<tr>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;&nbsp;网格线:</td>

<td class="editTd" ><select size="1" name="gridding" style="width:120px">

<option value="0" selected>请选择...</option>

<option value="1" >不显示</option>

<option value="2" >横向</option>

<option value="3" >纵向</option>

<option value="4" >纵横向</option>

</select></td>

</tr>

<tr>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;</td>

<td class="editTd" >&nbsp;&nbsp;网格线颜色:</td>

<td class="editTd" ><select size="1" name="gridding_color" style="width:120px">

<option value="0" selected>请选择...</option>

<option value="black">black</option>

<option value="blue">blue</option>

<option value="cyan">cyan</option>

<option value="gray">gray</option>

<option value="green">green</option>

<option value="light gray">light gray</option>

<option value="magenta">magenta</option>

<option value="orange">orange</option>

<option value="pink">pink</option>

<option value="red">red</option>

<option value="white">white</option>

<option value="yellow">yellow</option>

</select></td>

</tr>

<tr><td bgcolor="#FFFFF9" height="20" colspan="7"></td></tr>

<tr><td bgcolor="#00000f" height="1" colspan="7"></td></tr>

<tr><td bgcolor="#FFFFF9" height="20" colspan="7"></td></tr>

<tr><td align="center" class="editTd" colspan="7">

<input type="Submit" value="submit" name="submit" onClick="verify()" style="width:56px;height:20px;">&nbsp;&nbsp;&nbsp;&nbsp;

<input type="Reset" value="reset" name="reset" style="width:56px;height:20px;"></td></tr>

</table>

</form>

</body>

</html>

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有