使用eclipse開發(fā)jsp,進(jìn)行表達(dá)式輸出時(shí)出錯(cuò)
如下面的代碼,使用eclipse開發(fā)jsp,進(jìn)行表達(dá)式輸出時(shí)出錯(cuò),最后輸出<%=multitable()%>的時(shí)候老報(bào)錯(cuò)"syntax error on tocken")",delete this tocken",究竟是怎么回事???求各位大神救命!!!
<%@ 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>我的個(gè)人主頁</title>
</head>
<body>
<%!
String s="";
?String multitable(){
int i,j;
for(i=0;i<10;i++)
{
for(j=0;j<i;j++){
s+=i+"*"+j+"="+(i*j)+" "+" "+" "+" ";
}?
s+="<br>";
}return s;
}
%>
?<h3> 九九乘法表</h3>
<hr>
<%=multitable()%>
</body>
</html>
2017-08-07
我復(fù)制的你的代碼,沒有報(bào)錯(cuò)。把i=0改成i=1;