poll.jsp

来自「简单实现的商品购物系统」· JSP 代码 · 共 79 行

JSP
79
字号
<%@ page contentType="text/html; charset=GBK" %>
<%@ page  import="bookshop.PollBean,java.util.HashMap" %>

<style type="text/css">
<!--
.style1 {
	font-size: 18px;
	font-weight: bold;
	color: #FFFFFF;
}
-->
</style>
</head>
<script src="myMouse.js" type=""></script>

<body bgcolor="#ffffff">

  <p>
      <%
     PollBean xie=new PollBean();
     HashMap dd=xie.getCount();

      double A= Double.parseDouble(dd.get("A").toString());
      double B= Double.parseDouble(dd.get("B").toString());
      double C= Double.parseDouble(dd.get("C").toString());
      double D= Double.parseDouble(dd.get("D").toString());
      double E=A+B+C+D;
      double AA=A/E*100;
 double BB=B/E*100;
  double CC=C/E*100;
   double DD=D/E*100;

%></p>
  <p align="center">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="769" height="90">
      <param name="movie" value="flash/zouyong.swf">
      <param name="quality" value="high">
      <embed src="flash/zouyong.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="769" height="90"></embed>
    </object> 
  </p>
<table border="1" width=100% align="center" background="background/1.gif">
  <tr>
    <td>
      <table border=1 style="border-collapse:collapse;" align="center" width=100% cellpadding=0 cellspacing=0 bordercolor=#6a7f8a >
        <tr>
          <td width=64% height="20" align=center>图形百分比</td>
          <td width=16% align=center>标准</td>
          <td width=20% align=center>在线投票数</td>
        </tr>
    </table></td>
  </tr>
</table>
<table width="100%" height="127"  border="1" align="center" bordercolor="#6a7f9a">
  <tr>
    <td width="64%"><hr  align="left" size="12"  width="<%=AA%>%" color="#FF0000"></td>
    <td width="16%"><div align="center">很好!</div></td>
    <td width="20%"><div align="center"><%=A%>人</div></td>
  </tr>
  <tr>
    <td><hr  align="left" size="12"  width="<%=BB%>%" color="#00FF00"></td>
    <td><div align="center">还不错!</div></td>
    <td><div align="center"><%=B%>人</div></td>
  </tr>
  <tr>
    <td><hr  align="left" size="12"  width="<%=CC%>%"  color="#0000FF"></td>
    <td><div align="center">一般般!</div></td>
    <td><div align="center"><%=C%>人</div></td>
  </tr>
  <tr>
    <td><hr  align="left" size="12"  width="<%=DD%>%"  color="#FFFF00"></td>
    <td><div align="center">关了吧!</div></td>
    <td><div align="center"><%=D%> 人</div></td>
  </tr>
</table>



<p align="center">&nbsp;</p>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?