JSP第一周作业
1.环境搭建,运行出来一个JSP页面,显式hello
<%-- Created by IntelliJ IDEA. User: 97442 Date: 2022/3/21 Time: 16:13 To change this template use File | Settings | File Templates. --%> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>$Title$</title> </head> <body> hello<br> </body> </html>
2.英文字母表
<%-- Created by IntelliJ IDEA. User: 97442 Date: 2022/3/21 Time: 16:13 To change this template use File | Settings | File Templates. --%> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>$Title$</title> </head> <body> <h2>英文字母表:</h2> <%for(char c = 'A'; c <= 'Z'; c++){ out.print(c + "(" + (char)(c+32) + ") "); } %> </body> </html>
3. 99乘法表
<%-- Created by IntelliJ IDEA. User: 97442 Date: 2022/3/21 Time: 16:13 To change this template use File | Settings | File Templates. --%> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>$Title$</title> </head> <body> <h2>99乘法表:</h2> <%for(int a = 1; a <= 9; a++){ for(int b = 1; b <= a; b++){ out.print(b + "x" + a + "=" + (a*b) + " "); } out.print("</br>"); } %> </body> </html>