zoukankan      html  css  js  c++  java
  • JSP页面输出九九乘法表--JSP基础

    index.jsp:

    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

    <!DOCTYPE HTML>
    <html>
    <head>
    <title>My JSP 'index.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">
    </head>
    <body>
    <%
    String str="";
    for(int i=1;i<=9;i++){
    for(int j=1;j<=i;j++){
    str+=j+"x"+i+"="+j*i+"&nbsp;&nbsp;";
    }
    str+="<br>";
    }
    %>
    <div>
    <%=str%>
    </div>
    </body>
    </html>

    示例效果图:

  • 相关阅读:
    2019/1/2
    2018/12/22
    2018/12/18
    2018/12/17
    2018/12/16
    编程总结汇总
    学习总结汇总
    第十三周学习总结--助教
    第十一周编程总结
    第10周编程总结
  • 原文地址:https://www.cnblogs.com/qikeyishu/p/7476599.html
Copyright © 2011-2022 走看看