摘要: package com.pdcss.io;import java.io.BufferedReader;import java.io.BufferedWriter;import java.io.File;import java.io.FileNotFoundException;import java.io.FileReader;import java.io.FileWriter;import java.io.IOException;public class IOTest { /** * file1>>file2 * @throws IOException */ public stat 阅读全文
posted @ 2013-12-05 17:53 搜索中... 阅读(187) 评论(0) 推荐(0) 编辑
摘要: SimpleDateFormatsdf = new SimpleDateFormat("yyyy年MM月dd日"); //MM必须为大写System.out.println("时间为:"+sdf.format(new Date())); 阅读全文
posted @ 2013-12-05 17:40 搜索中... 阅读(168) 评论(0) 推荐(0) 编辑
摘要: js判断是否为中文 第一种:function funcChina(){var obj = document.form1.txtName.value;if(/.*[\u4e00-\u9fa5]+.*$/.test(obj)){alert("不能含有汉字!");return false;}return true;}第二种:if (escape(str).indexOf("%u") < 0){//字符串 str 中含有汉字}原理:escape对字符串进行编码,字符值大于 255 的以 %u**** 格式存储,而字符值大于 255 的恰好是非英文字符(一般 阅读全文
posted @ 2013-12-05 17:35 搜索中... 阅读(1971) 评论(0) 推荐(0) 编辑