第一周JSP作业
1.运行JSP界面
2.英文字母表
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body> <h1>英文字母表</h1> <% for(char m='A';m<='Z';m++){ out.print(m+"("+(char)(m+32)+")"+" "); if(m=='M') out.print("<br>"); } %> </body> </html>
3.九九乘法表
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body> <h1>九九乘法表</h1> <% int m; for(int i=1;i<=9;i++){ for(int j=1;j<=i;j++){ m=i*j; out.print(j+"x"+i+"="+m+" "); } out.print("<br>"); } %> </body> </html>