10 2011 档案

摘要:ExtJS:E-mail邮箱验证正则表达式 : regex: /^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/汉字输入验证正则表达式: regex: /^[\u4E00-\u9FA5]+$/以下内容是从网上转过来的,想仔细学一下1.字符x 字符 x。例如a表示字符a\\ 反斜线字符。在书写时要写为\\\\。(注意:因为java在第一次解析时,把\\\\解析成正则表达式\\,在第二次解析时再解析为\,所以凡是不是1.1列举到的转义字符,包括1.1的\\,而又带有\的都要写两次)\0n 带有八进制值 0的字符 n (0 <= n < 阅读全文
posted @ 2011-10-27 20:42 lihui_yy 阅读(372) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2011-10-27 19:21 lihui_yy 阅读(444) 评论(0) 推荐(0) 编辑
摘要:1.验证码的代码是在网上搜罗的,是底纹乱线类的数字验证:authcode.jsp: 每次调用都会在 session 中添加一个属性,验证用户输入是否正确是只需再取出和输入内容比较即可<%@ page contentType="image/JPEG" import="java.awt.*,java.awt.image.*,java.util.*,javax.imageio.*" pageEncoding="GBK"%><%!Color getRandColor(int fc, int bc) {//给定范围获得随机颜色 阅读全文
posted @ 2011-10-21 14:41 lihui_yy 阅读(5161) 评论(0) 推荐(0) 编辑
摘要:存CookieCookie idCookie = new Cookie("userId", request.getParameter("id"));Cookie psdCookie = new Cookie("psd", request.getParameter("psd"));idCookie.setMaxAge(3600);//存3600秒也就是1小时psdCookie.setMaxAge(3600);response.addCookie(idCookie);response.addCookie(psdCook 阅读全文
posted @ 2011-10-20 21:42 lihui_yy 阅读(1351) 评论(0) 推荐(0) 编辑
摘要:配置/WEB-INF/web.xml文件: <servlet> <servlet-name>count</servlet-name> <jsp-file>/WEB-INF/count.jsp</jsp-file> <init-param> <param-name>driver</param-name> <param-value>org.git.mm.mysql.Driver</param-value> </init-param> <init-param> 阅读全文
posted @ 2011-10-19 20:40 lihui_yy 阅读(390) 评论(0) 推荐(0) 编辑
摘要:<%@ page language="java" import="java.util.*" pageEncoding="GBK"%><%@ page contentType="text/html; charset=GBK" %><%@page import="java.math.BigInteger"%><%@page import="java.io.File"%><%@page import="java.io. 阅读全文
posted @ 2011-10-19 19:40 lihui_yy 阅读(695) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <title>输入需保存的内容</title> <meta http-equiv="content-type" content="text/html; charset=GBK"> </head> <body> <form action="fileoperate.jsp&qu 阅读全文
posted @ 2011-10-19 11:13 lihui_yy 阅读(10329) 评论(0) 推荐(0) 编辑