使用jsp库标签写长发口诀表

来源:互联网 发布:淘宝小卖家月收入 编辑:程序博客网 时间:2024/04/28 02:14

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
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 'zy.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>
  <div align="center">
  <h2>乘法口诀表
  </h2>
</div>
<c:forEach var="x" begin="1" end="9">
  <c:forEach var="y" begin="1" end="${x}">
  <c:out value="${x}*${y}=${x*y}"/>&nbsp;&nbsp;&nbsp;&nbsp;
  </c:forEach>
  <br/>
  </c:forEach>


  </body>
</html>

原创粉丝点击