前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >简易计算器页面

简易计算器页面

作者头像
全栈程序员站长
发布2022-07-12 15:53:56
7380
发布2022-07-12 15:53:56
举报

大家好,又见面了,我是全栈君,祝每个程序员都可以多学几门语言。

Calculator.jsp:

代码语言:javascript
复制
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>制作简易计算器</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>
  
  <body>
    <form action="servlet/ResultServlet" method="post">
          <table>
              <tr>
                <td>
                  <label>操作数一:</label>
                  <input type="text" name="operandOne"/>
                </td>
              </tr>
              <tr>
                <td>
                  <label>操作数二:</label>
                  <input type="text" name="operandTwo"/>
                </td>
              </tr>
              <tr>
                <td>
                   <label>运算符:</label>
                   <select name="operator">
	    				<option>+</option>
	    				<option>-</option>
	    				<option>*</option>
	    				<option>/</option>
	    		   </select>
                </td>
              </tr>
              <tr>
                 <td>
                   <input type="submit" value="计算">
                 </td>
              </tr>
          </table>
    </form>
  </body>
</html>

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/118825.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2021年11月,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档