需用ajax到后台请求
@Controller
public class RandomPictureController extends ControllerUtil {
/*
* 随机字符字典
*/
private static final char[] CHARS = { '2', '3', '4', '5', '6', '7', '8',
'9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M',
'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };
/*
* 随机数
*/
private static Random random = new Random();
/*
* 获取6位随机数
*/
private static String getRandomString() {
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < 4; i++) {