<%! private static int i = 0 ;%> 这样可以定义一个变量或者常亮 <%= i++%> 这样可以直接取值并++ 转载于:https://my.oschina.net/u/3730801/blog/1584767