摘要: 前几天想要做一个校验用户名是否已被占用的功能,用jq的ajax,jq没有什么问题,代码贴在下面:[java]view plaincopy$.ajax({type:"GET",//url:"usernameCheck",url:"jsp/usernameCheck.jsp",data:"username="+str,dataType:"json",success:function(result){if(result.exist==true){usernameNotExist=false;alert 阅读全文
posted @ 2014-04-07 23:06 无可厚_非 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 前几天在网上copy了一段代码,关于struts2生成验证码,原本拷贝下来的myeclipes报错,原因是下面这三个类访问权限问题:[java]view plaincopyimportcom.sun.image.codec.jpeg.ImageFormatException;importcom.sun.image.codec.jpeg.JPEGCodec;importcom.sun.image.codec.jpeg.JPEGImageEncoder;但是实际使用过程中是不会出错的,也可以通过设置将error改成warning,但是害怕老师那边过不去,所以去除了这三个类,改成下面的:[java] 阅读全文
posted @ 2014-04-07 16:56 无可厚_非 阅读(146) 评论(0) 推荐(0) 编辑