代码20170308001:

<%@ 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>My JSP 'MyJsp20170308001.jsp' starting 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>
 
  <body>
  <form name="forml" method="post"  action="002.jsp">
  数字:
  <label>
  <input type="text" name="number" id="textfield"><br>
  <input type="submit" name="button"id="button"value="提交">
  </label>
  </form>
  </body>
</html>
代码002:

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%String Num; %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'MyJsp20170308002.jsp' starting 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>
 
  <body>
    <% Num=request.getParameter("number"); %> <br>
     <%
    Integer.valueOf(Num);
    
     %>
     <%
     if(Integer.valueOf(Num)>10){ %>
     <%=+Integer.valueOf(Num)+">10" %>
     <%
     }else if(Integer.valueOf(Num)==10){ %>
     <%=+Integer.valueOf(Num)+"=10" %>
    
     <%}else if(Integer.valueOf(Num)<10){ %>
     <%=+Integer.valueOf(Num)+"<10" %>
     <%} %>
  </body>


</html

最新文章

  1. 保留password模式文本框textbox内的数据不丢失。
  2. Nodejs学习总结 -Express入门(一)
  3. 3 构建Mysql+heartbeat+DRBD+LVS集群应用系统系列之heartbeat的搭建
  4. Linux 进程
  5. [转]揭秘webdriver实现原理
  6. 让IE8支持HTML5及canvas功能!
  7. python学习好书推荐
  8. 层叠水平(stacking level)
  9. 【转】Android fill_parent和wrap_content分析
  10. #define offsetof(TYPE, MEMBER) ((size_t) &amp;((TYPE *)0)-&gt;MEMBER)
  11. ItemsControl 使用Grid布局
  12. Android 向系统添加一个联系人信息contact
  13. Fedora 19+ 启动顺序调整
  14. asp.net uploadfile 上传文件,连接已重置问题
  15. 单节点伪分布式Hadoop配置
  16. Namespacing in PHP (php 中使用命名空间)
  17. Java数据类型及运算
  18. 主要讲下hack的兼容用法,比较浅,哈哈
  19. 邓_PHP面试【001】
  20. 实用HTML5游戏资源

热门文章

  1. office2016出现 此功能看似已中断 并需要修复
  2. linux命令:rsync
  3. CF-831C
  4. [翻译] 物理引擎javascript实现
  5. ubuntu删除g2o
  6. mysql 快捷键
  7. Visual Studio 2010下WorldWind编译问题集合
  8. L2-023 图着色问题 (25 分)vector
  9. WindowsService服务程序开发 安装和卸载
  10. 3DMAX 3场景制作