语法格式:
<% java代码或脚本代码 %>
样例:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
String str="";
for (int i = 1; i <= 9; ++i)
{
for(int j = 1; j <= i; ++j)
{
str += j + "*" + i + "=" + j*i;
str += " ";
}
str += "<br>";
}
%>
<table>
<tr>
<td align="center">九九乘法表</td>
</tr>
<tr>
<td><%= str %></td>
</tr>
</table>
</body>
</html>