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