随笔 - 64  文章 - 9  trackbacks - 0
<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

常用链接

留言簿(6)

我参与的团队

随笔分类(88)

随笔档案(92)

文章分类(142)

文章档案(182)

天基成员

学习园

我的海角

搜索

  •  

积分与排名

  • 积分 - 178745
  • 排名 - 320

最新评论

cal.html


<html>
<body>
<form name="form1"  method="post"  action="docal.jsp">
<center>
请输入直角边1的长:<input type = "text" name = "arg1">
<br>
请输入直角边2的长:<input type = "text" name = "arg2">
<br>
<input type = "submit" name = "计算">
</center>
</form>
</body>
</html>

docal.jsp

/*如何算一个直角三角形的 面积,首先要取三角形的两个直角边长,面积是两个直角边长之积的1/2;*/
<%@ page contentType="text/html;charset=GB2312"%>
<html>
<body>
<center>
<font  size="20" color="blue">
<%
int a=Integer.parseInt(request.getParameter("arg1"));
int b=Integer.parseInt(request.getParameter("arg2"));
int s=a*b/2;
out.print("直角三角形边1的长度是:"+a+"<br>");
out.print("直角三角形边2的长度是:"+b+"<br>");
out.print("直角三角形的 面积是:"+s+"<br>");
 %>
</font>
</center>
</body>
</html>

 

posted on 2009-05-03 11:05 鹏凌 阅读(1007) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: