Jsp第二次作业
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Insert title here</title> </head> <body> 编写jsp页面,输出大写、小写英文字母表 <br> <% for(int i=0;i<26;i++){ out.print((char)(i+65)); out.print((char)(i+97)); out.print("\n"); } %> </body> </html>
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Insert title here</title> </head> <body> 用循环结构输出三行五列的table <br> <table border="1"> <%for(int i=1;i<=3;i++){%> <tr> <%for(int j=1;j<=5;j++){%> <td width="40"><%=j %></td> <%}%> </tr> <%}%> </table> </body> </html>