30行报错Syntax error, insert ";" to complete LocalVariableDeclarationStatement 40行报错Syntax error on token ")", { expected
要怎么改?大神帮忙解答,谢谢
要怎么改?大神帮忙解答,谢谢
2017-01-01
<!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>九九乘法表</title>
</head>
<body>
<%!
String MultiplyTable1()
{
String s="";
for(int i=1;i<=9;i++)
{
for(int j=1;j<=i;j++)
{
s+=i+"*"+j+"="+(i*j)+" ";
}
s+="<br />";
}
return s;
}
%>
<!-- 利用脚本语言编写,需要用到JspWriter的内置对象out -->
<%!
void MultiplyTable2(JspWriter out)throws Exception
{
for(int i=1;i<=9;i++)
{
for(int j=1;j<=i;j++)
{
out.println(i+"*"+j+"="+(i*j)+" ");
}
out.println("<br />");
}
}
%>
<h1>九九乘法表</h1>
<hr />
<%=MultiplyTable1() %>
<hr />
<% MultiplyTable2(out); %>
</body>
</html>
举报