摘要: //验证Email地址 bool IsValidEmail(string strIn) { return Regex.IsMatch(strIn, @"^([/w-/.]+)@((/[[0-9]{1,3}/.[0-9]{1,3}/.[0-9]{1,3}/.)|(([/w-]+/.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(/]?)$"); }// 验证输入汉字 public bool IsChinese(string str_chinese){ return System.Text.RegularExpressions.Regex.IsMatch(str_ 阅读全文
posted @ 2012-11-10 16:17 黄星宇 阅读(185) 评论(0) 推荐(0) 编辑
摘要: //添加cookiefunction addCookie(objName,objValue,objHours){ var str = objName + "=" + escape(objValue); if(objHours > 0){//为0时不设定过期时间,浏览器关闭时cookie自动消失 var date = new Date(); var ms = objHours*3600*1000; date.setTime(date.getTime() + ms); str += "; expires=" + date.toGMTString(); 阅读全文
posted @ 2012-11-10 16:07 黄星宇 阅读(125) 评论(0) 推荐(0) 编辑
摘要: js获取当前时间日期 阅读全文
posted @ 2012-11-10 15:57 黄星宇 阅读(1137) 评论(0) 推荐(0) 编辑
摘要: js实现页面跳转的几种方式 阅读全文
posted @ 2012-11-10 15:48 黄星宇 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 在IE中:document.body.clientWidth ==> BODY对象宽度document.body.clientHeight ==> BODY对象高度document.documentElement.clientWidth ==> 可见区域宽度document.documentElement.clientHeight ==> 可见区域高度 在FireFox中:document.body.clientWidth ==> BODY对象宽度document.body.clientHeight ==> BODY对象高度document.document 阅读全文
posted @ 2012-11-10 15:46 黄星宇 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 文本框text:$("#txt").attr("value") //获取值$("#txt").attr("value",'11'); //设置值多选框checkbox: $("#checkbox_id").attr("value"); //获取CheckBox的Value$("#chec... 阅读全文
posted @ 2012-11-10 15:35 黄星宇 阅读(197) 评论(0) 推荐(0) 编辑